mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-10 20:45:59 +01:00
Always use discard
This commit is contained in:
parent
d53c9b0a32
commit
652d1d3104
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user