EXT_conservative_depth
WebGL working group (public_webgl 'at' khronos.org)
Members of the WebGL working group
Last modified date: January 11, 2024
Revision: 2
WebGL extension #54
Written against the WebGL API 2.0 specification.
This extension exposes the EXT_conservative_depth functionality to WebGL.
The following WebGL-specific behavioral changes apply:
depth_unchanged
layout qualifier is not supported.
gl_FragDepth
is inconsistent with its layout qualifier,
implementations may enforce consistency by clamping it to the value of gl_FragCoord.z
.
Consult the above extension for documentation, issues and new functions and enumerants.
When this extension is enabled:
GL_EXT_conservative_depth
with an #extension
directive:gl_FragDepth
built-in output variable may be redeclared with a depth layout qualifier.
GL_EXT_conservative_depth
is defined as 1
.
[Exposed=(Window,Worker), LegacyNoInterfaceObject] interface EXT_conservative_depth { };
#extension GL_EXT_conservative_depth : enable // Ensure that the shader compiles when the extension is not supported #ifdef GL_EXT_conservative_depth layout (depth_greater) out highp float gl_FragDepth; #endif void main() { // Assign to gl_FragDepth as usual }
Revision 1, 2023/06/01
Revision 2, 2024/01/11