Files
axyz/resources/Shaders/Shadow.frag.glsl
T
FakeShemp 2049d630e9 Revert "Revert "Shadows""
This reverts commit 73b8bff1f3.
2016-03-07 19:45:46 +01:00

22 lines
360 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;
}
}