Files
eepp/bin/assets/shaders/df.frag
Martín Lucas Golini 077b7cedef Minor fixes.
2016-03-27 21:53:47 -03:00

10 lines
327 B
GLSL

uniform sampler2D textureUnit0;
const float smoothing = 1.0/16.0;
void main()
{
float distance = texture2D( textureUnit0, gl_TexCoord[0].xy ).a;
float alpha = smoothstep( 0.5 - smoothing, 0.5 + smoothing, distance );
gl_FragColor = vec4( gl_Color.rgb * texture2D( textureUnit0, gl_TexCoord[0].xy ).rgb, alpha );
}