Files
axyz/resources/Shaders/Shadow.frag.glsl
T
2016-02-28 19:46:50 +01:00

25 lines
363 B
GLSL

#version 430
#define ALPHA_CUTOFF 0.3
layout (binding = 24) uniform sampler2D DiffuseTexture;
uniform float Alpha;
in VertexData{
vec2 TextureCoordinate;
}Input;
layout (location = 0) out float ShadowMap;
void main()
{
vec4 diffuseTexel = texture(DiffuseTexture, Input.TextureCoordinate) * Alpha;
if (diffuseTexel.a < ALPHA_CUTOFF)
{
discard;
}
}