1
0
Fork 0
mirror of https://github.com/dragonfireclient/dragonfireclient.git synced 2024-11-23 11:14:01 -05:00
dragonfireclient/client/shaders/shadow_shaders/pass1_fragment.glsl
Liso c47313db65
Shadow mapping render pass (#11244)
Co-authored-by: x2048 <codeforsmile@gmail.com>
2021-06-06 18:51:21 +02:00

13 lines
241 B
GLSL

uniform sampler2D ColorMapSampler;
varying vec4 tPos;
void main()
{
vec4 col = texture2D(ColorMapSampler, gl_TexCoord[0].st);
if (col.a < 0.70)
discard;
float depth = 0.5 + tPos.z * 0.5;
gl_FragColor = vec4(depth, 0.0, 0.0, 1.0);
}