[Bf-blender-cvs] [54d9138a87b] geometry-nodes-deduplicate-float-math: support remaining math functions

Jacques Lucke noreply at git.blender.org
Wed Nov 25 13:47:59 CET 2020


Commit: 54d9138a87b5a14f5332e99c1219c537768d6371
Author: Jacques Lucke
Date:   Wed Nov 25 12:29:10 2020 +0100
Branches: geometry-nodes-deduplicate-float-math
https://developer.blender.org/rB54d9138a87b5a14f5332e99c1219c537768d6371

support remaining math functions

===================================================================

M	source/blender/nodes/NOD_math_functions.hh

===================================================================

diff --git a/source/blender/nodes/NOD_math_functions.hh b/source/blender/nodes/NOD_math_functions.hh
index 70319c032ed..c212fb0bf51 100644
--- a/source/blender/nodes/NOD_math_functions.hh
+++ b/source/blender/nodes/NOD_math_functions.hh
@@ -137,6 +137,8 @@ inline bool try_dispatch_float_math_fl_fl_to_fl(const int operation, OpType &&op
       return dispatch([](float a, float b) { return floorf(safe_divide(a, b)) * b; });
     case NODE_MATH_ARCTAN2:
       return dispatch([](float a, float b) { return atan2f(a, b); });
+    case NODE_MATH_PINGPONG:
+      return dispatch([](float a, float b) { return pingpongf(a, b); });
   }
   return false;
 }
@@ -161,6 +163,12 @@ inline bool try_dispatch_float_math_fl_fl_fl_to_fl(const int operation, OpType &
       return dispatch([](float a, float b, float c) -> float {
         return ((a == b) || (fabsf(a - b) <= fmaxf(c, FLT_EPSILON))) ? 1.0f : 0.0f;
       });
+    case NODE_MATH_SMOOTH_MIN:
+      return dispatch([](float a, float b, float c) { return smoothminf(a, b, c); });
+    case NODE_MATH_SMOOTH_MAX:
+      return dispatch([](float a, float b, float c) { return -smoothminf(-a, -b, -c); });
+    case NODE_MATH_WRAP:
+      return dispatch([](float a, float b, float c) { return wrapf(a, b, c); });
   }
   return false;
 }



More information about the Bf-blender-cvs mailing list