Skip to main content

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!!**

0 votes
1 answer
25 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
43 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
40 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
36 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
27 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
38 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
0 votes
0 answers
84 views
+200

GLSL fragment shader Sine wave change the direction and color

I have glsl Fragment shader code need to change the line color, background color and, direction of the sine wave eprecision mediump float; #endif uniform vec2 u_resolution; uniform vec2 u_mouse; ...
Wimal Weerawansa's user avatar
0 votes
1 answer
49 views

webgl2 trouble rendering float texture to canvas

If I use webgl2 to render something (e.g. a triangle) to an RGBA UNSIGNED_BYTE texture, then render that texture to the canvas, everything works fine. But I'm having trouble getting my example to work ...
user123's user avatar
0 votes
0 answers
43 views

Unity C++ WebGL build Error _ZN2cv3MatC1Ev

I'm trying this link to use OpenCV in unity. It works in UnityEditor but doesn't work in WebGL builds. Gives me errors when I try to build.. Errors : Library\Bee\artifacts\WebGL\build\...
erin's user avatar
  • 1
-2 votes
0 answers
34 views

Three JS Portal implementation artifacts

enter image description here I need help, I'm trying to create a portal effect using a stencil buffer in three js . and obviously my code looks correct but I still get those artifacts when I increase ...
yassir benmoussa's user avatar
0 votes
0 answers
47 views

ThreeJS ShaderMaterial WebGL conversion

I'm working to convert the SplaTV WebGL library to use ThreeJS and I'm struggling to get it converted. The code in the original repo is challenging to understand as it's not documented and while I ...
arvinkx's user avatar
  • 194
0 votes
0 answers
14 views

Clearing multiple attachments on a target with different colors in three.js

I make a WebGLTarget with several attachments. I would like to clear them with different colors. So far the only solution i found was provided by ChatGPT and it basically does it on the webgl level ...
pailhead's user avatar
  • 5,341
0 votes
2 answers
53 views

How can I use a matrix from CSS's matrix3d in a WebGL2 shader?

I currently have a CSS matrix3d transform I like, let's say this one for example: transform: matrix3d(1.3453,0.1357,0.0,0.0003,0.2096,1.3453,0.0,0.0003,0.0,0.0,1.0,0.0,-100.0,-100.0,0.0,1.0); ...
rebane2001's user avatar
0 votes
0 answers
26 views

Cesium Viewer Crashes when clipping is enabled

I have an entity which has mouse over event enabled, and I am picking the entity using scene.pick as shown below. const pickedObject = viewer.scene.pick(movement.endPosition); This is throwing an ...
saadat ali's user avatar
  • 1,013
0 votes
0 answers
23 views

Wrapping 2D mesh on top of another 3D mesh (BabylonJS/ThreeJS)

Is there a way to wrap (not just position and rotate) a 2D mesh (mesh with no depth - monogram) on top of some 3D mesh in BabylonJS or ThreeJS in a way that would distort the 2D mesh that would fit ...
Ivan Maglica's user avatar

15 30 50 per page
1
2 3 4 5
452