diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-25 11:04:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-25 11:04:25 +0300 |
commit | ef22d2e8adb9965cd3cb91e733d4b9754cf6024f (patch) | |
tree | 1d95a52cd619be4b9974c6aa2f197373a1831912 /source/blender/nodes/shader | |
parent | 2a6e4f71576ebee19f34fd5f7c214fd2e9f060f8 (diff) | |
parent | d02335a1950c81fffea815f31e47bca92ab7d33c (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/nodes/shader')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_math.c | 7 |
1 files changed, 7 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: |