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:
Diffstat (limited to 'source/blender/nodes/intern/math_functions.cc')
-rw-r--r--source/blender/nodes/intern/math_functions.cc32
1 files changed, 32 insertions, 0 deletions
diff --git a/source/blender/nodes/intern/math_functions.cc b/source/blender/nodes/intern/math_functions.cc
index cc5e9547a96..32a18f1c193 100644
--- a/source/blender/nodes/intern/math_functions.cc
+++ b/source/blender/nodes/intern/math_functions.cc
@@ -41,6 +41,8 @@ const FloatMathOperationInfo *get_float_math_operation_info(const int operation)
RETURN_OPERATION_INFO("Sine", "math_sine");
case NODE_MATH_COSINE:
RETURN_OPERATION_INFO("Cosine", "math_cosine");
+ case NODE_MATH_TANGENT:
+ RETURN_OPERATION_INFO("Tangent", "math_tangent");
case NODE_MATH_ARCSINE:
RETURN_OPERATION_INFO("Arc Sine", "math_arcsine");
case NODE_MATH_ARCCOSINE:
@@ -114,4 +116,34 @@ const FloatMathOperationInfo *get_float_math_operation_info(const int operation)
return nullptr;
}
+const FloatMathOperationInfo *get_float_compare_operation_info(const int operation)
+{
+
+#define RETURN_OPERATION_INFO(title_case_name, shader_name) \
+ { \
+ static const FloatMathOperationInfo info{title_case_name, shader_name}; \
+ return &info; \
+ } \
+ ((void)0)
+
+ switch (operation) {
+ case NODE_FLOAT_COMPARE_LESS_THAN:
+ RETURN_OPERATION_INFO("Less Than", "math_less_than");
+ case NODE_FLOAT_COMPARE_LESS_EQUAL:
+ RETURN_OPERATION_INFO("Less Than or Equal", "math_less_equal");
+ case NODE_FLOAT_COMPARE_GREATER_THAN:
+ RETURN_OPERATION_INFO("Greater Than", "math_greater_than");
+ case NODE_FLOAT_COMPARE_GREATER_EQUAL:
+ RETURN_OPERATION_INFO("Greater Than or Equal", "math_greater_equal");
+ case NODE_FLOAT_COMPARE_EQUAL:
+ RETURN_OPERATION_INFO("Equal", "math_equal");
+ case NODE_FLOAT_COMPARE_NOT_EQUAL:
+ RETURN_OPERATION_INFO("Not Equal", "math_not_equal");
+ }
+
+#undef RETURN_OPERATION_INFO
+
+ return nullptr;
+}
+
} // namespace blender::nodes