22 lines
473 B
GLSL
22 lines
473 B
GLSL
// XC_BUILTIN_SHADOW_CASTER_OPENGL_PS
|
|
#version 430
|
|
|
|
layout(binding = 0) uniform sampler2D uBaseColorTexture;
|
|
|
|
layout(std140, binding = 1) uniform MaterialConstants {
|
|
vec4 gBaseColorFactor;
|
|
vec4 gAlphaCutoffParams;
|
|
};
|
|
|
|
in vec2 vTexCoord;
|
|
|
|
void main() {
|
|
#ifdef XC_ALPHA_TEST
|
|
vec4 baseColor = texture(uBaseColorTexture, vTexCoord) * gBaseColorFactor;
|
|
if (baseColor.a < gAlphaCutoffParams.x) {
|
|
discard;
|
|
}
|
|
#endif
|
|
gl_FragDepth = gl_FragCoord.z;
|
|
}
|