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
0
votes
1 answer

WebGL2 texelFetch'ing a texture unexpected results

I have created a 1x1 texture with the parameters gl.R8, gl.RED, gl.UNSIGNED_BYTE to gl.texImage2D. I imagine that this will essentially just create a 1 byte buffer. Now I want to access this 1 byte buffer in my fragment shader, using texelFetch,…
Cinolt Yuklair
  • 397
  • 2
  • 11
0
votes
1 answer

xtk renderer3D's pick() produce errors in webgl2 enabled browsers

Has anyone used xtk with webgl2 to do the pick() call? specifically renderer3d's. Error: WebGL: drawArrays: Feedback loop detected...renderer3D.js:1977:7 Error: WebGL: readPixels: Out-of-bounds reads with readPixels are deprecated, and may be slow.…
mei
  • 67
  • 9
0
votes
3 answers

copy a float texture with webgl2

I can no longer find any trace of copyTexImage2D in the specification of webgl2 : https://www.khronos.org/registry/webgl/specs/latest/2.0/ A few months ago I had asked the question of how to make a float-texture copy. With webgl version 1.0 this was…
oceanGermanique
  • 336
  • 3
  • 16
0
votes
2 answers

HTML Canvas Sniff Webgl Data

This question might be weird but suppose we have a canvas which for example draws some 3D content like this experiment. Disregarding using ThreeJS, Babylon or any other library to achieve same effect, is it possible to set some interval that copies…
ProllyGeek
  • 15,517
  • 9
  • 53
  • 72
0
votes
1 answer

How to pack/unpack 11 and 10 bit floats in JavaScript for WebGL2

WebGL2 supports UNSIGNED_INT_10F_11F_11F_REV texture type where floating point values are represented as unsigned 10 and 11 bit floats. How do I create the packed values and how can I unpack them back into floats?
gman
  • 100,619
  • 31
  • 269
  • 393
0
votes
0 answers

WebGL textureCubeLod causes seams on chrome/safari and not on ios

I'm working on the Image Based Lighting portion of a PBR shader in three.js. I'm using a .dds cubemap texture, brought in through DDSLoader. I'm getting terrible seams in the lower lods on chrome and safari. The wild part is that the material looks…
user3889022
  • 75
  • 2
  • 7
0
votes
2 answers

How to read depth texture attached to FBO in WebGL2

I'm now working on the deferred shading using WebGL2.0. One primary problem I'm now facing is that I can't read the depth value from the DEPTH_ATTACHMENT. Actually I creat my own GBuffer with a DEPTH24_STENCIL8 texture as DEPTH_ATTACHMENT, then I…
Skyfeiyun
  • 81
  • 1
  • 5
0
votes
1 answer

Which internal format works with compressedTexImage3D?

I'm trying to use texture compression with TexImage3D in WebGL2 using Firefox 47 (nightly) but I cannot find a valid format. The error is: Error: WebGL: compressedTexImage3D: Format COMPRESSED_RGB_S3TC_DXT1_EXT cannot be used with…
Gerold Meisinger
  • 4,500
  • 5
  • 26
  • 33
-1
votes
1 answer

Chrome DevTools - Set WebGL version

In Chrome DevTools, is it possible to set the version of WebGL and/or disable WebGL for testing purposes?
Ben
  • 15,938
  • 19
  • 92
  • 138
-1
votes
1 answer

Nothing is rendering in a canvas

I am not able to render anything in canvas and the console is not showing any error. I think my eye is missing something. I am doing nothing just trying to render the cube coordinate in canvas but nothing is being displayed. ( this sentence inside…
Pravin Poudel
  • 1,433
  • 3
  • 16
  • 38
-1
votes
1 answer

WebGL2 draw multiple textures in one draw call

I am having some trouble finding mistake in the code. I hope you will indicate me the direction where to look for a solution. I try to use 2+ textures in one draw call. For testing I use 2 textures. 1-st texture for vertex shader - matricies saved…
newWeb
  • 11
  • 2
-1
votes
1 answer

webGL gl.uniformMatrix4v function

I'm following a tutorial,although there are resources but still I'm not sure as to why we use uniformMatrix4v function.Here's the code snippet. var matWorldMatrixLocation = gl.getUniformLocation(program,'mWorld'); var matViewMatrixLocation =…
Himanshu Jotwani
  • 378
  • 2
  • 16
-1
votes
1 answer

Better ways to load triangle vertices in your shader for ray tracer

currently i am trying to implement a ray tracer with triangle mesh in WebGL 2. So far i am loading the data in a buffer texture and then i unpack them like this: for (int i = 0; i < vertsCount; i += 3) { a = texelFetch(uMeshData,…
Thodoris Koutsis
  • 109
  • 1
  • 12
-2
votes
1 answer

How do I fade in borders of an image in html canvas

How can I fade in borders of an image in canvas (webgl). Here is an example of what I would like to achieve: Initially I was trying to use canvas filtering filter: blur(8px) however it blurs the entire image. But I want to have only blurred edges…
slowloris
  • 17
  • 3
-2
votes
1 answer

How is DeckGL's performance for visualizing massive point cloud data?

What has been your experience with using DeckGL for visualization large point clouds? I am new to WebGL generally and am assessing frameworks/approaches to use for visualizing a massive amount of point cloud data.
Amy.js
  • 536
  • 4
  • 11
1 2 3
26
27