Files
eepp/bin/assets/shaders/df.frag
Martín Lucas Golini 9a1ab27e9e Moved binaries to bin.
Moved assets to bin/assets.
2013-12-22 23:58:17 -03:00

10 lines
321 B
GLSL

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