Fix for OSL bug reported on IRC by Pablo Vasquez: Clamp option of the math node in OSL produces bad results. Really stupid bug, OSL math node was assigning the clamped 1st input value instead of the

clamped result of the actual operation.
This commit is contained in:
Lukas Toenne
2013-10-23 11:30:18 +00:00
parent 0039b44d10
commit 89fc09b3be

View File

@@ -95,6 +95,6 @@ shader node_math(
Value = safe_modulo(Value1, Value2);
if (Clamp)
Value = clamp(Value1, 0.0, 1.0);
Value = clamp(Value, 0.0, 1.0);
}