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

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

Error creating WebGL context: WebGL not available for compressed textures. Silently failing

In my production app for some users I get the error Error creating WebGL context: WebGL not available for compressed textures. Silently failing.. The error occurs when calling the following function ...
0
votes
0answers
65 views

How to set texel invisible depending on a texture from another object

Introduction I want to be able to create a sort of fog of war for my app using shaders. I feel that I might be close, but I can't figure out how to make it work… (maybe I don’t have the right approach ...
0
votes
1answer
20 views

WebGL Combined Camera Rotations

Why is it that when I multiply a rotation matrix with the camera matrix - let rotation = m.mult4(m.rotateX(xRads)),m.rotateY(yRads))); camera = m.mult4(rotation,camera); I get incorrect rotation. But ...
0
votes
1answer
29 views

Leveraging webGL to find bounding boxes

Given some vertices with xyz coordinates it is easy to obtain an xyz aligned bounding box, just take the min/max xyz values from the vertices. Ideally, these values only have to be found once and can ...
2
votes
2answers
73 views

WebGL textures from YouTube video frames

I'm using the technique described here (code, demo) for using video frames as WebGL textures, and the simple scene (just showing the image in 2D, rather than a 3D rotating cube) from here. The goal is ...
-2
votes
0answers
51 views

Why does the WebGL shader gives me a syntax error?

I just started learning Three.js and am trying to make my first project, but the shader gives me a silly Uncaught SyntaxError: Unexpected token '{' I don't know why. Everything looks good, I think. So ...
1
vote
1answer
19 views

XBIM Web Viewer - Calculate HTML position from WCS

I'm trying to put an overlay over the top face of the bounding box of selected object. What I'm doing is: 1- Get the vertices of the bounding box top face in WCS, from center point 2- Translate each ...
0
votes
1answer
31 views

Can you use a float array in a WebGL Shader?

I'm trying to use a WebGL shader to visualize some audio data. I have an array of number which represent a normalized .wav file: "demo": {"duration": 0.021111111111111112, "...
0
votes
0answers
19 views

Unity WebGL Dev-Build: Automatically save profiling data (to filesystem)

The issue is that I want to automate profiling and saving profiling data of my WebGL project during the 'Build & Run' of a Developmentbuild. However, to my knowledge, in this way the script does ...
-1
votes
0answers
16 views

The material should ignore everything that goes behind it, even if it’s semi-transparent

We need to gain the following behavior of the threejs material: The material should ignore everything that goes behind it, even if it’s semi-transparent. The problem needs to be solved: by mixing ...
0
votes
0answers
22 views

What functions do WebGL VAOs react to?

After combing through the OpenGL reference and comparing to WebGL's API, my understanding of Vertex Array Objects is that, when bound, they capture information about each attribute's VBO binding, size,...
0
votes
0answers
38 views

Plot points from data texture in glsl shader

I have encoded 100 float values into a 100x1 image texture. The original values were between a range of 0-1, but I remapped them to 0-255 so I could see them in the texture: I would like to plot ...
4
votes
1answer
43 views

Canvas added to YouTube is not visible

I'm following the WebGL tutorial from MDN (code, demo (black rectangle)) to create a WebGL canvas. The goal is a userscript (with WebGL shaders, i.e. video effects) for YouTube. So I opened a YouTube ...
0
votes
0answers
34 views

What's the purpose of `gl.deleteShader` in WebGL?

It's a sensible function in OpenGL ES, where such objects are referenced by unsigned integers. But WebGL is a JavaScript binding and it's by direct object reference: gl.createShader returns a ...
0
votes
0answers
57 views

CORS Request Failing only on Firefox

I'm working with Unity WebGL and i'm having an issue with CORS when the loader tries to download the needed unityweb files for the build. The error: Cross-Origin Request Blocked: The Same Origin ...

15 30 50 per page