Questions tagged [webgl2]

WebGL 2 is the 2nd version of WebGL. It is based on OpenGL ES 3.0

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

Beginner problem when create instancing in webgl2 [closed]

Hey i'm started to learn webgl2, and i'm trying to follow the instancing example on the webgl2 fundamentals, but i get console warn "Vertex buffer is not big enough for the draw call." and ...
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,...
0
votes
1answer
27 views

Binding textures or using texture units

I am using webgl2 to solve and visualize partial differential equations on a website interactively, so I am using one shader to visualize an array while a few other shaders run computations on the ...
4
votes
0answers
35 views

Nothing is displayed when loading my WebGL2 html file

I am reading a book on WebGL2. I am new to both HTML and WebGL and am trying to educate myself. I have a problem with loading one of the examples of the book, which is posted here. For convenience, I ...
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
0answers
14 views

In the OpenGL ES Shading Language, what triggers the execution of main() and what that of a "global code section"?

I am wondering what exactly causes the main function to be triggered to be executed in an OpenGL ES Shading Language program and when the "global section" of a program is executed. In my ...
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, ...
0
votes
0answers
25 views

Webgl orbiting object with camera

I am playing around in webgl and have built a simple gltf loader, that allows to move the main object around. I can orbit the object, but it only allows to view the front side. I can orbit the object, ...
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 ...

15 30 50 per page
1
2 3 4 5
23