mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-16 04:43:42 +01:00
Hack for contraption cutout
This commit is contained in:
parent
507a1b1696
commit
6eca281134
1 changed files with 14 additions and 0 deletions
|
@ -40,6 +40,14 @@ void FLWFinalizeWorldPos(inout vec4 worldPos) {
|
||||||
#elif defined(FRAGMENT_SHADER)
|
#elif defined(FRAGMENT_SHADER)
|
||||||
#use "flywheel:core/lightutil.glsl"
|
#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;
|
in vec3 BoxCoord;
|
||||||
|
|
||||||
out vec4 FragColor;
|
out vec4 FragColor;
|
||||||
|
@ -57,6 +65,12 @@ void FLWFinalizeColor(vec4 color) {
|
||||||
color.a = a;
|
color.a = a;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(ALPHA_DISCARD)
|
||||||
|
if (color.a < ALPHA_DISCARD) {
|
||||||
|
discard;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
FragColor = color;
|
FragColor = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue