diff --git a/src/main/resources/assets/create/flywheel/shaders/context/contraption.glsl b/src/main/resources/assets/create/flywheel/shaders/context/contraption.glsl index 61d0b80c2..42d22c52d 100644 --- a/src/main/resources/assets/create/flywheel/shaders/context/contraption.glsl +++ b/src/main/resources/assets/create/flywheel/shaders/context/contraption.glsl @@ -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; }