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
This commit is contained in:
Dalai Felinto
2012-08-29 17:30:14 +00:00
parent 7a13bc2196
commit c052ebda8e
6 changed files with 19 additions and 1 deletions

View File

@@ -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;