All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

How to deal with many shaders in a complex WebGL program?

I know that there are two main ways shaders can be used in a WebGL application: store them in HTML inside a <script type="x-shader"> tag like this <script type="x-shader/x-...
  • 491
-5 votes
0 answers
31 views

Is it more efficient to use JS .drawImage() to draw images compared to WebGL? [closed]

Displaying around 30 images on the canvas every 60fps, for a game. (Either redrawing the same images, or deleting those and drawing new ones.) Which one is more performant? JS drawImage, or recreating ...
  • 45
1 vote
0 answers
25 views

Why do the pictures I save with webgl have black borders?

I have a picture in jpg format(9248 × 6936, 36.6MB). At first I tried to display it completely in webgl. const VERTEX_SHADER = ` attribute vec2 a_position; attribute vec2 a_texCoord; varying vec2 ...
0 votes
1 answer
53 views

ThreeJS how to change text particles color

I have been trying for days to modify the colors in this project and I couldn't In particulat I'd like to change: the background color [edit, I was able to do this] the yellow and white fixed colors ...
1 vote
1 answer
138 views

WebGL is rendering shapes wrong

I have some code that is supposed to take some parsed radar data, and render it on a Mapbox GL JS map with WebGL. I have gotten as far as being able to render the general radar shape onto a map, but ...
0 votes
0 answers
20 views

NotSupportedError: Failed to execute 'animate' on 'Element': Partial keyframes are not supported in UnityProgress.js

In the webgl unity using a custom loader, and animating it through below code. fileName: UnityProgress.js fill.animate([{ width: value * 100 + '%' }], { duration: 300, fill: 'forwards', });...
0 votes
0 answers
29 views

How can I make a Circle using TRIANGLE_FAN in webgl using Parametric Equation for the General Circle (x + g)2 + (y + f)2 = r2

I am new to WEBGL and facing problem while rendering circle using TRIANGLE_FAN I have written the complete code but don't know what's going wrong while rendering semi circle It is making one ...
0 votes
0 answers
52 views

WebGL animation inside Squarespace codeblock

I'm trying to insert an animation to a specific codeblock on my Squarespace website (the codeblock is at the top of my page, I want it to be the hero) I'm using an animation from Codepen: https://...
  • 858
1 vote
1 answer
90 views

Unable to load GLSL fragment shader file .frag inside a html

Here is a GLSL .frag file and I want to run it inside html. The .frag shader file. // Heartfelt - by Martijn Steinrucken aka BigWings - 2017 // Email:[email protected] Twitter:@The_ArtOfCode // ...
  • 122
1 vote
0 answers
72 views

Approximating sphere recursively using WebGL, but getting some errors

I'm super new to WebGL and trying to run the below portion of my code, but it's not working. I'm following an exercise in my textbook for approximating a sphere object using subdivision. Trying to ...
0 votes
0 answers
401 views

WebGL Fluid Simulation mouse effect implementation on website

Anyone has idea how to implement this: https://paveldogreat.github.io/WebGL-Fluid-Simulation/ to get mouse interaction like on this website https://advanced.team/ ? I have been able to set up the same ...
  • 9
2 votes
1 answer
58 views

How to prevent compositing with an HTML canvas?

I am developing an application using a WebGL canvas, and I notice through benchmarking that a significant amount of time is spent "compositing layers". But I don't think this should be ...
  • 10.1k
0 votes
0 answers
21 views

Using multiple WebGL programs causes an unintended canvas reset

I am trying to write a desmos like webgl app. I have made two programs, one to draw a static grid and another one for drawing some points. I am drawing the grid first, but when I start drawing the ...
0 votes
1 answer
132 views

Uncaught ReferenceError: loadmodel is not defined. I am getting this error while working with PHP and JavaScript file type=module

I am recently started working with THREE.js and WebGL to load car models. I want to call the custom function using on click event listener so that function gets an address from the data- attribute and ...
0 votes
1 answer
44 views

is there an method to send multiple PHP variables to custom JavaScript function as an parameter in external file of type module?

I am working with three.js and WebGL. I am currently trying to send references from the database to a custom javascript function to load a model but I am getting results undefined in the alert. I am ...

15 30 50 per page
1
2 3 4 5
35