2026-02-21 19:41:21 -08:00
|
|
|
#version 450
|
|
|
|
|
|
2026-02-22 06:28:18 -08:00
|
|
|
layout(set = 0, binding = 0) uniform sampler2D uTexture;
|
2026-02-21 19:41:21 -08:00
|
|
|
|
2026-02-22 06:28:18 -08:00
|
|
|
layout(set = 0, binding = 1) uniform ShadowParams {
|
2026-02-21 19:41:21 -08:00
|
|
|
int useBones;
|
|
|
|
|
int useTexture;
|
|
|
|
|
int alphaTest;
|
|
|
|
|
int foliageSway;
|
|
|
|
|
float windTime;
|
|
|
|
|
float foliageMotionDamp;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
layout(location = 0) in vec2 TexCoord;
|
|
|
|
|
layout(location = 1) in vec3 WorldPos;
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
if (useTexture != 0) {
|
2026-02-23 03:53:50 -08:00
|
|
|
vec4 texColor = textureLod(uTexture, TexCoord, 0.0);
|
2026-02-21 19:41:21 -08:00
|
|
|
if (alphaTest != 0 && texColor.a < 0.5) discard;
|
|
|
|
|
}
|
|
|
|
|
}
|