GLSL: On some cards '>' can't operate on 'float' and 'int'

So make it so comparison doesn't imply type-cast.
This commit is contained in:
Sergey Sharybin 2015-02-04 15:54:42 +05:00
parent da06dab4e5
commit 3b0c4d888c

@ -300,7 +300,7 @@ void math_modulo(float val1, float val2, out float outval)
/* change sign to match C convention, mod in GLSL will take absolute for negative numbers,
* see https://www.opengl.org/sdk/docs/man/html/mod.xhtml */
outval = (val1 > 0) ? outval : -outval;
outval = (val1 > 0.0) ? outval : -outval;
}
void math_abs(float val1, out float outval)