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:
authorCharlie Jolly <mistajolly@gmail.com>2020-02-25 17:52:01 +0300
committerCharlie Jolly <mistajolly@gmail.com>2020-03-02 15:49:19 +0300
commit847c091ae838a0e5268fc327dac931c810d88d9b (patch)
tree0284badd5653d67447fc692bd61230bfc9def8b6 /source/blender/nodes
parent493c99078a8fbd8807f137401c11d401b85ba0e7 (diff)
Shading: Add invert option to Vector Rotate Node
Checkbox to invert rotation angle, suggested by @simonthommes Differential Revision: https://developer.blender.org/D6932
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_vector_rotate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_vector_rotate.c b/source/blender/nodes/shader/nodes/node_shader_vector_rotate.c
index bee5377c438..c94cb903bf3 100644
--- a/source/blender/nodes/shader/nodes/node_shader_vector_rotate.c
+++ b/source/blender/nodes/shader/nodes/node_shader_vector_rotate.c
@@ -51,7 +51,8 @@ static int gpu_shader_vector_rotate(GPUMaterial *mat,
};
if (node->custom1 < ARRAY_SIZE(names) && names[node->custom1]) {
- return GPU_stack_link(mat, node, names[node->custom1], in, out);
+ float invert = (node->custom2) ? -1.0 : 1.0;
+ return GPU_stack_link(mat, node, names[node->custom1], in, out, GPU_constant(&invert));
}
else {
return 0;