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:
authorCampbell Barton <ideasman42@gmail.com>2018-05-25 11:04:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-25 11:04:25 +0300
commitef22d2e8adb9965cd3cb91e733d4b9754cf6024f (patch)
tree1d95a52cd619be4b9974c6aa2f197373a1831912 /source/blender/nodes
parent2a6e4f71576ebee19f34fd5f7c214fd2e9f060f8 (diff)
parentd02335a1950c81fffea815f31e47bca92ab7d33c (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_math.c7
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_math.c6
2 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_math.c b/source/blender/nodes/shader/nodes/node_shader_math.c
index 6cd58d2fb85..f36310f4d00 100644
--- a/source/blender/nodes/shader/nodes/node_shader_math.c
+++ b/source/blender/nodes/shader/nodes/node_shader_math.c
@@ -221,6 +221,11 @@ static void node_shader_exec_math(void *UNUSED(data), int UNUSED(thread), bNode
r = fabsf(a);
break;
}
+ case NODE_MATH_ATAN2:
+ {
+ r = atan2(a, b);
+ break;
+ }
}
if (node->custom2 & SHD_MATH_CLAMP) {
CLAMP(r, 0.0f, 1.0f);
@@ -235,6 +240,7 @@ static int gpu_shader_math(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(
"math_divide", "math_sine", "math_cosine", "math_tangent", "math_asin",
"math_acos", "math_atan", "math_pow", "math_log", "math_min", "math_max",
"math_round", "math_less_than", "math_greater_than", "math_modulo", "math_abs",
+ "math_atan2"
};
switch (node->custom1) {
@@ -249,6 +255,7 @@ static int gpu_shader_math(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(
case NODE_MATH_LESS:
case NODE_MATH_GREATER:
case NODE_MATH_MOD:
+ case NODE_MATH_ATAN2:
GPU_stack_link(mat, node, names[node->custom1], in, out);
break;
case NODE_MATH_SIN:
diff --git a/source/blender/nodes/texture/nodes/node_texture_math.c b/source/blender/nodes/texture/nodes/node_texture_math.c
index 19bc16fb82d..d8dc2a62625 100644
--- a/source/blender/nodes/texture/nodes/node_texture_math.c
+++ b/source/blender/nodes/texture/nodes/node_texture_math.c
@@ -189,6 +189,12 @@ static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
break;
}
+ case NODE_MATH_ATAN2:
+ {
+ *out = atan2(in0, in1);
+ break;
+ }
+
default:
{
BLI_assert(0);