22 lines
562 B
GLSL
22 lines
562 B
GLSL
// XC_BUILTIN_DEPTH_ONLY_VULKAN_PS
|
|
#version 450
|
|
|
|
layout(set = 2, binding = 0) uniform texture2D uBaseColorTexture;
|
|
layout(set = 3, binding = 0) uniform sampler uLinearSampler;
|
|
|
|
layout(set = 1, binding = 0, std140) uniform MaterialConstants {
|
|
vec4 gBaseColorFactor;
|
|
vec4 gAlphaCutoffParams;
|
|
};
|
|
|
|
layout(location = 0) in vec2 vTexCoord;
|
|
|
|
void main() {
|
|
#ifdef XC_ALPHA_TEST
|
|
vec4 baseColor = texture(sampler2D(uBaseColorTexture, uLinearSampler), vTexCoord) * gBaseColorFactor;
|
|
if (baseColor.a < gAlphaCutoffParams.x) {
|
|
discard;
|
|
}
|
|
#endif
|
|
}
|