mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-02 03:26:29 +03:00
10 lines
321 B
GLSL
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 );
|
|
}
|