Use GL_ARB_conservative_depth when possible

- Allows the depth test to discard fragments before the fragment shader is run
This commit is contained in:
Jozufozu 2021-12-11 22:03:53 -08:00
parent 01866db72e
commit dfdb8abf49

View file

@ -39,12 +39,13 @@ void FLWFinalizeWorldPos(inout vec4 worldPos) {
#use "flywheel:core/lightutil.glsl" #use "flywheel:core/lightutil.glsl"
#define ALPHA_DISCARD 0.1 #define ALPHA_DISCARD 0.1
// // optimize discard usage
//#if defined(ALPHA_DISCARD) #if defined(ALPHA_DISCARD)
//#if defined(GL_ARB_conservative_depth) #if defined(GL_ARB_conservative_depth)
//layout (depth_greater) out float gl_FragDepth; #extension GL_ARB_conservative_depth : enable
//#endif layout (depth_greater) out float gl_FragDepth;
//#endif #endif
#endif
in vec3 BoxCoord; in vec3 BoxCoord;