WebGL
Khronos
 

WebGL EXT_conservative_depth Extension Specification

Name

EXT_conservative_depth

Contact

WebGL working group (public_webgl 'at' khronos.org)

Contributors

Members of the WebGL working group

Version

Last modified date: January 11, 2024
Revision: 2

Number

WebGL extension #54

Dependencies

Written against the WebGL API 2.0 specification.

Overview

This extension exposes the EXT_conservative_depth functionality to WebGL.

The following WebGL-specific behavioral changes apply:

Consult the above extension for documentation, issues and new functions and enumerants.

When this extension is enabled:

IDL

[Exposed=(Window,Worker), LegacyNoInterfaceObject]
interface EXT_conservative_depth {
};
  

Sample Code

#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 History

Revision 1, 2023/06/01

Revision 2, 2024/01/11