forked from fte/fteqw
1
0
Fork 0

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
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ void main(void)
float gray = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b; 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. gray = gray = pow(gray, 0.7); //quake is just too dark otherwise.
else 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. 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; // # if (gray > 0.8) n = 11512810.0; // #
vec2 p = mod(uv/4.0, 2.0) - vec2(1.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)); col = vec3(character(n, p));
else else
col = col*character(n, p); //note that this is kinda cheating. col = col*character(n, p); //note that this is kinda cheating.