Questions tagged [webgl2]

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

WebGL 2 is based on OpenGL ES 3.0. See the spec

Getting started with WebGL2:

Webgl2fundamentals.org will get you setup with a basic understanding of WebGL2 and how it works.

Some differences from WebGL 1.0:

  • full support of non power of 2 textures
  • sampler objects
  • query objects
  • uniform buffer objects
  • instancing
  • many new texture formats
  • transform feedback (writing the output of vertex shaders to buffers)
  • GLSL 3.00
  • anti-aliased renderbuffers
405 questions
4
votes
1 answer

WebGL2: How to render via shaders onto a TEXTURE_3D

I've read that WebGL2 gives us access to 3d textures. I'm trying to use this to perform some GPU-side computations and then store the output in a 64x64x64 3D texture. The render flow is compute shader -> render to 3dTexture -> read shader -> render…
M -
  • 26,908
  • 11
  • 49
  • 81
4
votes
0 answers

why is modern pixijs so much slower than v3.0.0?

this is bunnymark. it renders 100k sprites at 17 fps https://pixijs.io/bunny-mark/ this is an old version of bunnymark using pixi v3. it renders 100k sprites at 165 fps (at least) https://www.goodboydigital.com/pixijs/bunnymark/ old pixijs v3 is…
Farzher
  • 13,934
  • 21
  • 69
  • 100
4
votes
1 answer

How to use multiple Uniform Buffer Objects

In my OpenGL ES 3.0 program I need to have two separate Uniform Buffer Objects (UBOs). With just one UBO, things work as expected. The code for that case looks as follows: GLSL vertex shader: version 300 es layout (std140) uniform MatrixBlock { …
ackh
  • 1,648
  • 2
  • 18
  • 36
4
votes
0 answers

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 have put the first few lines of the HTML code in…
afp_2008
  • 1,940
  • 1
  • 19
  • 46
4
votes
1 answer

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 I'm looking for, and I can include them…
trbabb
  • 1,894
  • 18
  • 35
4
votes
1 answer

How to create WebGL 2 renderer in iOS?

I am trying to create a THREE.WebGLRenderer, but it seems that on iOS, it will only create a WebGL 1. Here is my code for creating the renderer and printing the capability: var renderer = new THREE.WebGLRenderer({antialias:…
4
votes
1 answer

Callback on transform feedback to prevent getBufferSubData graphics pipeline stall

When I read vertex data to a Float32Array from a transform buffer in Chrome using getBufferSubData, I get the warning "performance warning: READ-usage buffer was read back without waiting on a fence. This caused a graphics pipeline stall.". My…
bm13563
  • 688
  • 5
  • 18
4
votes
0 answers

IOS or Mac WebGL2 support for Chrome and Firefox?

I have found the webGL2 enable option of Safari. But webGL2 still doesn't work on Chrome and Firefox on Mac or IOS? Is there any option to enable webGL2?
4
votes
0 answers

WebGL (2.0) canvas blending with HTML in linear color space

Problem Description Hi! I'm creating a WebGL 2.0 vector shapes renderer and I'm facing a serious problem that I don't know how to resolve. My current rendering pipeline looks like this: I'm drawing shapes in my shaders with premultiplied colors in…
Wojciech Danilo
  • 11,573
  • 17
  • 66
  • 132
4
votes
1 answer

How disable float arithmetic optimizations working with uniforms in WebGL/WebGL2 shaders

I am trying to implement 64-bit arithmetic on the WebGL or WebGL2 shaders based on 32-bit floats. One of the basic functions which is needed there is the function which is splitting any float number into two "non overlapping" floats. The first float…
David
  • 189
  • 5
4
votes
1 answer

Disable images caching in browser

I have Earth weather web application that once per six hours receives new weather maps (as images). I want to browser to not cache these images to allow user experience fresh weather not cached from previous days. My setup is: Angular 2 application…
Kedriik
  • 331
  • 4
  • 12
4
votes
1 answer

WebGL - INVALID_OPERATION: texImage2D: ArrayBufferView not big enough for request

I'm currently following this guide to render my scene to a texture to generate a depth / shadow map: http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-14-render-to-texture/ The guide is in C++. I'm converting it into WebGL - JavaScript…
user8826104
4
votes
3 answers

How do I obtain pixel data from a canvas I don't own?

I am trying to get the pixel RGBA data from a canvas for further processing. I think the canvas is actually a Unity game if that makes a difference. I am trying to do this with the canvas of the game Shakes and Fidget. I use the readPixels method…
TPRammus
  • 491
  • 1
  • 6
  • 19
4
votes
1 answer

WebGL: async operations?

I'd like to know if there are any async calls for WebGL that one could take advantage of? I have looked into Spec v1 and Spec v2 they don't mention anything. In V2, there is a WebGL Query mechanism which I don't think is what I'm looking for. A…
Jeff Saremi
  • 2,674
  • 3
  • 33
  • 57
4
votes
2 answers

WebGL2 has anti-alias automatically built-in?

I've been reading the source code for these examples and I continue to see this option, however, I can't locate anywhere whether this is a supported feature. Do you simply get antialias by turning on this flag? Any more details on this feature?
Detuned
  • 3,652
  • 4
  • 27
  • 54
1
2
3
26 27