mirror of https://github.com/bjornbytes/lovr.git
Fix font shader in WebGL;
This commit is contained in:
parent
abaecb7f60
commit
12700f9785
|
@ -71,8 +71,8 @@ const char* lovrFontFragmentShader = ""
|
|||
" return max(min(r, g), min(max(r, g), b)); \n"
|
||||
"} \n"
|
||||
"vec4 color(vec4 graphicsColor, sampler2D image, vec2 uv) { \n"
|
||||
" vec3 sample = texture(image, uv).rgb; \n"
|
||||
" float sdf = median(sample.r, sample.g, sample.b); \n"
|
||||
" vec3 col = texture(image, uv).rgb; \n"
|
||||
" float sdf = median(col.r, col.g, col.b); \n"
|
||||
" float w = fwidth(sdf); \n"
|
||||
" float alpha = smoothstep(.5 - w, .5 + w, sdf); \n"
|
||||
" if (alpha < .001) { discard; } \n"
|
||||
|
|
Loading…
Reference in New Issue