Files
axyz/resources/Shaders/Shadow.frag.glsl
T
FakeShemp 6dd7f1a657 Buggy transparent shadows.
Transparent textures might glow.
2016-02-28 18:00:23 +01:00

25 lines
363 B
GLSL

#version 430
#define ALPHA_CUTOFF 0.3
layout (binding = 12) 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;
}
}