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/shader/nodes/node_shader_bump.cc')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bump.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_bump.cc b/source/blender/nodes/shader/nodes/node_shader_bump.cc
index 252abd02ad7..690eacf30ff 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bump.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bump.cc
@@ -60,6 +60,17 @@ static int gpu_shader_bump(GPUMaterial *mat,
GPUNodeStack *in,
GPUNodeStack *out)
{
+ /* If there is no Height input, the node becomes a no-op. */
+ if (!in[2].link) {
+ if (!in[5].link) {
+ return GPU_link(mat, "world_normals_get", &out[0].link);
+ }
+ else {
+ /* Actually running the bump code would normalize, but Cycles handles it as total no-op. */
+ return GPU_link(mat, "vector_copy", in[5].link, &out[0].link);
+ }
+ }
+
if (!in[5].link) {
GPU_link(mat, "world_normals_get", &in[5].link);
}