Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [webgl]

WebGL extends the capability of the HTML canvas element to allow it to render accelerated graphics in any compatible web browser. **DO NOT TAG QUESTIONS ABOUT 3D LIBRARIES (like THREE.js) WITH THIS TAG** unless the question is specifically about a WebGL API feature. **DO NOT TAG QUESTION ABOUT UNITY WEBGL WITH THIS TAG!!**

1 vote
0 answers
9 views

How to prevent parcel from moving images around?

Trying to use webgl to render a texture, and I am using some npm libraries so I am using .cjs files and using parcel to run it. When I try to get the image from my resources file it doesnt work ...
ITDW2's user avatar
  • 13
0 votes
0 answers
35 views

Reaction diffusion with shaders on WEBGL

I'm writing a reaction diffusion simulation with p5js based on a video and this tutorial. The code so far is this: var vertSrc = ` #ifdef GL_ES precision mediump float; #endif attribute vec3 ...
SandWood Jones's user avatar
0 votes
0 answers
47 views

How do i pass uniforms to my glsl code at compile and during run time in three js?

I have a three js scene where i render meshes from a sdf glsl shader. I want to create uniforms on these shaders to adjust the distance field via sliders in the UI. Passing the shaders in from another ...
theseus's user avatar
  • 11
1 vote
1 answer
28 views

WEBGL_debug_render_info extension appears in getSupportedExtensions but doesn't work

I have opened the following HTML on multiple browsers (Chrome, Opera, etc.) but in the console it always logs 'WEBGL_debug_render_info extension doesn't work' despite gl.getSupportedExtensions() ...
Jhon's user avatar
  • 13
0 votes
0 answers
18 views

WebGL line using TRIANGLE_STRIPs are being contoured at the end

WebGL offers gl_LINES as a way to create lines, but you cannot control its thickness. Therefore, I made a shader and some js functionality to create lines using gl_TRIANGLE_STRIPs. It does make the ...
Karar Ali's user avatar
-1 votes
0 answers
31 views

Optimizing Unity WebGL Performance: Rendering Quality and Stability Issues [closed]

we’ve been developing a complex application in Unity that involves extensive rendering and numerous objects. On the PC build, the application performs well with smooth rendering and good response ...
Abtin Zandi's user avatar
0 votes
1 answer
34 views

Why is Webgl canvas effected by CSS background?

When I set my body element of background #000, and the circle seems great: Figure A However, with unset or #fff background, the color of the edge of this circle seems like calculated with white and ...
Subkey's user avatar
  • 1
-2 votes
1 answer
59 views

rotating image using webGL in a wide canvas

i am developing a web app that will be able to do some image transformations one of them is image rotation, the problem is: as long as the canvas is square ( width = height ) every thing is ok, but ...
Andrew Naem's user avatar
1 vote
0 answers
41 views

Pixi.js nested masks(object masked with another masked object) not working

I'm using pixi v7.3.3 and trying to mask a Graphics object with another masked Graphics object, but it doesn't get rendered and no error messages are issued. I create a pixi Graphics object, mask it ...
skyfire2008's user avatar
0 votes
1 answer
34 views

Trouble with reading a noise texture in GLSL

I'm writing a Perlin noise terrain generator with p5js, following this tutorial. The app ran poorly so I decided to rewrite it with shaders, something i've never used before. I started by generating a ...
SandWood Jones's user avatar
0 votes
0 answers
49 views

How to make completely white floor with shadows?

Please help. I want white floor and shadows on it, but all I get is lightgray floor with very thin shadow: lightgray floor My floor and light configuration: const ModelSceneEnvironment = () => { ...
kprovalov's user avatar
0 votes
1 answer
47 views

Zenject's LinqExtensions.cs failing in WebGL build

I have a game made in Unity 2021.1.26f1 which relies on Zenject. It runs great in the editor and in a Windows build. When I build for WebGL, however, I receive the following error: System.Linq....
abdb687's user avatar
0 votes
0 answers
46 views

How can I share texture between contexts in webgl or webgl 2

I have 2 canvases and 2 webgl contexts created from these canvases. I have a texture cacher, I want to put the texture used on one canvas in the cacher and then if this texture is used on another ...
Hasan Altınbaş's user avatar
1 vote
1 answer
34 views

Can shader read from and write to the same texture? [duplicate]

Can a shader render to a texture, and at the same time read from the texture it writes to? Effectively, that shader would write to the texture in place. What about consistency of such data? Is there ...
Jakub M.'s user avatar
  • 33.5k
0 votes
0 answers
42 views

Implementing 3D Object Animation with Bouncing and Color Change in WebGL/Three.js

I need to create a 3D object (cube, sphere, or torus knot) that moves around the viewport, changes direction upon hitting the edges (bouncing effect), and changes color each time it bounces. I'm using ...
Ahmad Alkhalid's user avatar

15 30 50 per page
1
2 3 4 5
452