mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 23:47:38 +01:00
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:
parent
01866db72e
commit
dfdb8abf49
1 changed files with 7 additions and 6 deletions
|
@ -39,12 +39,13 @@ void FLWFinalizeWorldPos(inout vec4 worldPos) {
|
|||
#use "flywheel:core/lightutil.glsl"
|
||||
|
||||
#define ALPHA_DISCARD 0.1
|
||||
//
|
||||
//#if defined(ALPHA_DISCARD)
|
||||
//#if defined(GL_ARB_conservative_depth)
|
||||
//layout (depth_greater) out float gl_FragDepth;
|
||||
//#endif
|
||||
//#endif
|
||||
// optimize discard usage
|
||||
#if defined(ALPHA_DISCARD)
|
||||
#if defined(GL_ARB_conservative_depth)
|
||||
#extension GL_ARB_conservative_depth : enable
|
||||
layout (depth_greater) out float gl_FragDepth;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
in vec3 BoxCoord;
|
||||
|
||||
|
|
Loading…
Reference in a new issue