Hack for contraption cutout

This commit is contained in:
Jozufozu 2021-11-24 11:12:59 -08:00
parent 507a1b1696
commit 6eca281134

View File

@ -40,6 +40,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
in vec3 BoxCoord;
out vec4 FragColor;
@ -57,6 +65,12 @@ void FLWFinalizeColor(vec4 color) {
color.a = a;
#endif
#if defined(ALPHA_DISCARD)
if (color.a < ALPHA_DISCARD) {
discard;
}
#endif
FragColor = color;
}