ded

Dramatic EDitor
Index Commits Files Refs README LICENSE
shaders/simple_text.frag (266B)
   1 #version 330 core
   2 
   3 uniform sampler2D image;
   4 
   5 in vec4 out_color;
   6 in vec2 out_uv;
   7 
   8 void main() {
   9     float d = texture(image, out_uv).r;
  10     float aaf = fwidth(d);
  11     float alpha = smoothstep(0.5 - aaf, 0.5 + aaf, d);
  12     gl_FragColor = vec4(out_color.rgb, alpha);
  13 }