Fix T73469: OSL: Vector Math Node modulo uses wrong function

This also fixes glsl version of fmod when both inputs are negative.

Differential Revision: https://developer.blender.org/D6704
This commit is contained in:
2020-01-29 12:17:58 +00:00
parent 051ee76f7f
commit d3670823b3
4 changed files with 9 additions and 8 deletions

View File

@@ -92,7 +92,7 @@ shader node_vector_math(string type = "add",
Vector = ceil(Vector1);
}
else if (type == "modulo") {
Vector = mod(Vector1, Vector2);
Vector = fmod(Vector1, Vector2);
}
else if (type == "fraction") {
Vector = Vector1 - floor(Vector1);