16 lines
252 B
GLSL
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;
|
|
}
|