[DEV] fragment shader error

This commit is contained in:
Edouard DUPIN 2014-01-22 23:16:20 +01:00
parent 5e3974f59d
commit dbd7e1a401

View File

@ -24,7 +24,11 @@ vec3 glow_color = vec3(0.0,0.0,0.0);
void main(void) {
vec4 color = texture2D(EW_texID, f_texcoord );
float dist = color.r;
#ifndef GL_ES
float width = fwidth(dist);
#else
float width = dist;
#endif
float alpha = smoothstep(f_glyphLevel-width, f_glyphLevel+width, dist);
// Smooth