Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-10-23 15:30:18 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-10-23 15:30:18 +0400
commit89fc09b3be854cb4228b681c8094bf0fbbce6eb5 (patch)
tree9aa7417a3e38784e7e74daa8d9b9bc10dcb20a23 /intern/cycles/kernel/shaders
parent0039b44d102f4d38c3a7750e9607f40b4ab1dee1 (diff)
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.
Diffstat (limited to 'intern/cycles/kernel/shaders')
-rw-r--r--intern/cycles/kernel/shaders/node_math.osl2
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/shaders/node_math.osl b/intern/cycles/kernel/shaders/node_math.osl
index c29891ed574..066e5f8dbe1 100644
--- a/intern/cycles/kernel/shaders/node_math.osl
+++ b/intern/cycles/kernel/shaders/node_math.osl
@@ -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);
}