mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-13 05:54:17 +01:00
Hack for contraption cutout
This commit is contained in:
parent
507a1b1696
commit
6eca281134
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user