Fix T51434: Module math operation is wrong in GLSL shading
Based on patch from @lazydodo. Reviewers: sergey Differential Revision: https://developer.blender.org/D2661
This commit is contained in:
@@ -403,7 +403,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.0) ? outval : -outval;
|
||||
outval = (val1 > 0.0) ? outval : outval - val2;
|
||||
}
|
||||
|
||||
void math_abs(float val1, out float outval)
|
||||
|
||||
Reference in New Issue
Block a user