exhibit ui
[laserbrain_demo] / sdr / dfont.p.glsl
1 uniform sampler2D tex;
2
3 void main()
4 {
5         const float softness = 0.008;
6
7         float alpha = texture2D(tex, gl_TexCoord[0].st).a;
8         float mask = smoothstep(0.5 - softness, 0.5 + softness, alpha);
9
10         gl_FragColor.rgb = gl_Color.rgb;
11         gl_FragColor.a = mask;
12 }