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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user