Fix a glsl type comparison bug

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5377 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2019-01-13 15:25:13 +00:00
parent 99e0191168
commit b930659fe8

View file

@ -34,7 +34,7 @@ void main(void)
float gray = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
if (r_glsl_ascii_mono != 0.0)
if (float(r_glsl_ascii_mono) != 0.0)
gray = gray = pow(gray, 0.7); //quake is just too dark otherwise.
else
gray = gray = pow(gray, 0.45); //col*char is FAR too dark otherwise, and much of the colour will come from the col term anyway.
@ -50,7 +50,7 @@ void main(void)
if (gray > 0.8) n = 11512810.0; // #
vec2 p = mod(uv/4.0, 2.0) - vec2(1.0);
if (r_glsl_ascii_mono != 0.0)
if (float(r_glsl_ascii_mono) != 0.0)
col = vec3(character(n, p));
else
col = col*character(n, p); //note that this is kinda cheating.