diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-23 08:04:03 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-23 08:04:03 +0300 |
commit | 9282d305bdc56522543129436db1e8a5d19cf39f (patch) | |
tree | b6d0cdcc7dd3f4113cf9e4f9813c40f44d29746e /intern/cycles/kernel/svm/svm_math.h | |
parent | de724a258eda45d1fed2b2176006c3b2df8abea2 (diff) | |
parent | 646a96bf8edc211a06f3df652101c265ee166e8d (diff) |
Merge branch 'master' into texture_nodes_refactortexture_nodes_refactor
Conflicts:
source/blender/nodes/texture/nodes/node_texture_math.c
Diffstat (limited to 'intern/cycles/kernel/svm/svm_math.h')
-rw-r--r-- | intern/cycles/kernel/svm/svm_math.h | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/intern/cycles/kernel/svm/svm_math.h b/intern/cycles/kernel/svm/svm_math.h index 1ce9386e40e..e3d8c1f3242 100644 --- a/intern/cycles/kernel/svm/svm_math.h +++ b/intern/cycles/kernel/svm/svm_math.h @@ -16,56 +16,6 @@ CCL_NAMESPACE_BEGIN -ccl_device float svm_math(NodeMath type, float Fac1, float Fac2) -{ - float Fac; - - if(type == NODE_MATH_ADD) - Fac = Fac1 + Fac2; - else if(type == NODE_MATH_SUBTRACT) - Fac = Fac1 - Fac2; - else if(type == NODE_MATH_MULTIPLY) - Fac = Fac1*Fac2; - else if(type == NODE_MATH_DIVIDE) - Fac = safe_divide(Fac1, Fac2); - else if(type == NODE_MATH_SINE) - Fac = sinf(Fac1); - else if(type == NODE_MATH_COSINE) - Fac = cosf(Fac1); - else if(type == NODE_MATH_TANGENT) - Fac = tanf(Fac1); - else if(type == NODE_MATH_ARCSINE) - Fac = safe_asinf(Fac1); - else if(type == NODE_MATH_ARCCOSINE) - Fac = safe_acosf(Fac1); - else if(type == NODE_MATH_ARCTANGENT) - Fac = atanf(Fac1); - else if(type == NODE_MATH_POWER) - Fac = safe_powf(Fac1, Fac2); - else if(type == NODE_MATH_LOGARITHM) - Fac = safe_logf(Fac1, Fac2); - else if(type == NODE_MATH_MINIMUM) - Fac = fminf(Fac1, Fac2); - else if(type == NODE_MATH_MAXIMUM) - Fac = fmaxf(Fac1, Fac2); - else if(type == NODE_MATH_ROUND) - Fac = floorf(Fac1 + 0.5f); - else if(type == NODE_MATH_LESS_THAN) - Fac = Fac1 < Fac2; - else if(type == NODE_MATH_GREATER_THAN) - Fac = Fac1 > Fac2; - else if(type == NODE_MATH_MODULO) - Fac = safe_modulo(Fac1, Fac2); - else if(type == NODE_MATH_ABSOLUTE) - Fac = fabsf(Fac1); - else if(type == NODE_MATH_CLAMP) - Fac = clamp(Fac1, 0.0f, 1.0f); - else - Fac = 0.0f; - - return Fac; -} - ccl_device float average_fac(float3 v) { return (fabsf(v.x) + fabsf(v.y) + fabsf(v.z))/3.0f; |