1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-20 19:45:22 +02:00
Files
luanti/client/shaders/shadow/pass1/opengl_fragment.glsl
2025-10-15 23:08:43 +02:00

20 lines
331 B
GLSL

uniform sampler2D ColorMapSampler;
varying vec4 tPos;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
void main()
{
vec4 col = texture2D(ColorMapSampler, varTexCoord);
if (col.a < 0.70)
discard;
float depth = 0.5 + tPos.z * 0.5;
gl_FragColor = vec4(depth, 0.0, 0.0, 1.0);
}