Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement EXT_frag_depth extension #26341
Comments
|
This is used by https://threejs.org/examples/webxr_vr_lorenzattractor.html. |
|
We will also need to enable the EXT_frag_depth field of servo/components/script/dom/webglshader.rs Line 224 in 90e07d0 |
|
#22112 is a good model showing how to implement a new WebGL extension. |
|
@highfive: assign me |
|
Hey @PeterZhizhin! Thanks for your interest in working on this issue. It's now assigned to you! |
|
Sorry, please unassign me. I will have time to return back to this problem after the 20th of May. |
|
@highfive: assign me |
|
Hey @splav! Thanks for your interest in working on this issue. It's now assigned to you! |
|
Hi! I've a question: According to Gecko code ( https://searchfox.org/mozilla-central/source/gfx/gl/GLContextFeatures.cpp#142 ) the feature is assumed to be supported if we have GL > 2 or GLES > 3 or extension. This logic could be replicated. Alternatively, we could test GLSL version. It should be 1.10+ for GL ( https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/gl_FragDepth.xhtml ) and 3.00+ for GLES ( https://www.khronos.org/registry/webgl/extensions/EXT_frag_depth/ ) . I'd prefer this option - it seems to be more explicit, since this is a shading language feature. |
|
Yes, ANGLE is always used to translate shaders. |
https://www.khronos.org/registry/webgl/extensions/EXT_frag_depth/
There are no new constants or APIs. All it requires is checking if the underlying extension is supported, which we should be able to copy from Gecko: https://searchfox.org/mozilla-central/source/dom/canvas/WebGLExtensionFragDepth.cpp#19-29