mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-10 20:45:59 +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
46745ae91d
commit
a3ee39099a
@ -25,13 +25,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
|
||||||
out vec4 fragColor;
|
out vec4 fragColor;
|
||||||
|
|
||||||
vec4 FLWBlockTexture(vec2 texCoords) {
|
vec4 FLWBlockTexture(vec2 texCoords) {
|
||||||
|
Loading…
Reference in New Issue
Block a user