All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ...
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,...
2
votes
1answer
49 views

WebGL line drawing issue

I am trying to draw simple shapes using WebGL LINES mode. These are my vertices: <canvas width="200" height="200".../> ... vertices.push( 0.01,0.13, 0.03,0.15, 0....
0
votes
1answer
39 views

What are the latest versions of OpenGL ES supported by emscripten, and how do I use them?

I am trying to make use of some ES 3.1 features, and it's unclear if this is supported: I notice that there is an OpenGL ES 3.1 header in the emscripten repository which defines some of the functions ...
0
votes
0answers
29 views

What is the fractional precision of highp clip space coordinates in WebGL and WebGL2?

In MDN it says that: In WebGL1, the precision of highp is 2^-16, which is 0.00001525878. In other words, I only have the "resolution" of 5 digits after the decimal point, right? In WebGL2, ...
2
votes
1answer
35 views

Can I store signed 16bit value in single channel in webgl2?

Is there a way to store signed 16bit value inside single channel? Im trying to store it inside red channel like this: gl.texImage2D(gl.TEXTURE_2D, 0, gl.R16I, width, height, 0, gl.RED, gl.SHORT, ...
0
votes
1answer
99 views

Pixi.js sometimes throws an error: WebGL unsupported in this browser

The site is constantly running on the terminal, and sometimes it gives the following error WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support. But when ...
0
votes
0answers
58 views

What are the use cases for WebGL 2's `texImage2D()` overloads?

I have two specific questions about WebGL 2's overloads added to texImage2D(). What is the purpose of WebGL 2 adding new overloads for texImage2D() that specify width, height and border for image/...
0
votes
0answers
55 views

Accessing textures in PIXI.Filter fragment shader

I'm trying to pass an image texture to my fragment shader (PIXI.Filter) but it won’t draw. const loader = PIXI.Loader.shared; const KEY = 'testImg'; loader.add(KEY, testImg); loader.load((loader, ...
0
votes
0answers
23 views

Three js application crashes when loading a lot of 4k textures

I use three js, load textures and models from the server, immediately assemble meshes and render, the fact is that when there are a lot of my 4k textures, the page simply reloads without any error (on ...
1
vote
1answer
54 views

Drawing multiple elements in Webgl

I have seen a lot of videos on youtube regarding this and I've visited these sites: https://webglfundamentals.org/webgl/lessons/webgl-drawing-multiple-things.html https://webgl2fundamentals.org/webgl/...
4
votes
2answers
166 views

Creating cursor trail with fragment shader

I wish to draw a simple mouse trail using fragment shaders, similar in appearance to drawing the following in processing (omitting the step of clearing the canvas). I cannot wrap my head around the ...
2
votes
1answer
51 views

Implementing series approximation/perturbation theory for WebGL2 based Mandelbrot viewer application

I have started building a mandelbrot viewer application with WebGL2 and JavaScript and am trying to implement series approximation at a basic level. I'm currently getting weird/distored/incomplete ...
0
votes
1answer
37 views

drawing specific instances in gl.drawArraysInstanced

I'm using the instancing technique for rendering lots of rectangles and it's working great to draw everything in one go with gl.drawArraysInstanced. However, I'd also like more control of it and to be ...
1
vote
1answer
45 views

Why isn't this drawing a triangle?

I don't know why my WebGL code is not drawing a simple triangle on the screen and I'm not sure how to debug it. The shaders are able to compile so I believe that's not the problem. main.js: const ...

15 30 50 per page
1
2 3 4 5
14