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:
authorDalai Felinto <dfelinto@gmail.com>2012-08-29 21:30:14 +0400
committerDalai Felinto <dfelinto@gmail.com>2012-08-29 21:30:14 +0400
commitc052ebda8e13df7dfb662a4ebb9fd42fbe74d23e (patch)
tree5055fe630b240e0b68093045384cdf05535184d7 /intern/cycles/kernel/svm/svm_math.h
parent7a13bc2196336c4ec45e86947d9fcb0b8d61f74e (diff)
Cycles bugfix: [32431] Cycles Math Node : Clamp does not work
the OSL solution is slightly different than the svm, but I think it's fine. thanks Lukas Toenne for helping with a fix on the original patch
Diffstat (limited to 'intern/cycles/kernel/svm/svm_math.h')
-rw-r--r--intern/cycles/kernel/svm/svm_math.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/kernel/svm/svm_math.h b/intern/cycles/kernel/svm/svm_math.h
index bc2f774097e..e39c7a4ba6c 100644
--- a/intern/cycles/kernel/svm/svm_math.h
+++ b/intern/cycles/kernel/svm/svm_math.h
@@ -108,6 +108,8 @@ __device float svm_math(NodeMath type, float Fac1, float Fac2)
Fac = Fac1 < Fac2;
else if(type == NODE_MATH_GREATER_THAN)
Fac = Fac1 > Fac2;
+ else if(type == NODE_MATH_CLAMP)
+ Fac = clamp(Fac1, 0.0f, 1.0f);
else
Fac = 0.0f;