Always use discard

This commit is contained in:
Jozufozu 2021-09-16 20:53:35 -07:00
parent d53c9b0a32
commit 652d1d3104

View File

@ -26,6 +26,14 @@ void FLWFinalizeWorldPos(inout vec4 worldPos) {
#elif defined(FRAGMENT_SHADER)
#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
vec4 FLWBlockTexture(vec2 texCoords) {
return texture2D(uBlockAtlas, texCoords);
}
@ -39,6 +47,12 @@ void FLWFinalizeColor(vec4 color) {
color.a = a;
#endif
#if defined(ALPHA_DISCARD)
if (color.a < ALPHA_DISCARD) {
discard;
}
#endif
gl_FragColor = color;
}