SparrowRenderer/shaders/shadow.frag.glsl
2016-06-13 07:58:39 +02:00

16 lines
252 B
GLSL

#ifdef ALPHA_MASK
uniform sampler2D alphaMask;
in vec2 varTexCoord;
#endif
out float fragmentdepth;
void main()
{
#ifdef ALPHA_MASK
if(texture(alphaMask, varTexCoord).r < 0.5)
discard;
#endif
fragmentdepth = gl_FragCoord.z;
}