Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Thu, 15 Feb 2018 07:05:02 +0000 (18:05 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 15 Feb 2018 07:05:02 +0000 (18:05 +1100)
1  2 
source/blender/nodes/shader/nodes/node_shader_displacement.c
source/blender/nodes/shader/nodes/node_shader_vector_displacement.c

@@@ -60,11 -60,11 +60,11 @@@ static int gpu_shader_displacement(GPUM
                GPU_link(mat, "direction_transform_m4v3", GPU_builtin(GPU_VIEW_NORMAL), GPU_builtin(GPU_INVERSE_VIEW_MATRIX), &in[3].link);
        }
  
-       if(node->custom1 == SHD_SPACE_OBJECT) {
+       if (node->custom1 == SHD_SPACE_OBJECT) {
 -              return GPU_stack_link(mat, "node_displacement_object", in, out, GPU_builtin(GPU_OBJECT_MATRIX));
 +              return GPU_stack_link(mat, node, "node_displacement_object", in, out, GPU_builtin(GPU_OBJECT_MATRIX));
        }
        else {
 -              return GPU_stack_link(mat, "node_displacement_world", in, out, GPU_builtin(GPU_OBJECT_MATRIX));
 +              return GPU_stack_link(mat, node, "node_displacement_world", in, out, GPU_builtin(GPU_OBJECT_MATRIX));
        }
  }
  
@@@ -48,9 -48,8 +48,9 @@@ static void node_shader_init_vector_dis
  
  static int gpu_shader_vector_displacement(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
  {
-       if(node->custom1 == SHD_SPACE_TANGENT) {
+       if (node->custom1 == SHD_SPACE_TANGENT) {
                return GPU_stack_link(mat,
 +                                    node,
                                      "node_vector_displacement_tangent",
                                      in,
                                      out,
                                      GPU_builtin(GPU_OBJECT_MATRIX),
                                      GPU_builtin(GPU_VIEW_MATRIX));
        }
-       else if(node->custom1 == SHD_SPACE_OBJECT) {
+       else if (node->custom1 == SHD_SPACE_OBJECT) {
 -              return GPU_stack_link(mat, "node_vector_displacement_object", in, out, GPU_builtin(GPU_OBJECT_MATRIX));
 +              return GPU_stack_link(mat, node, "node_vector_displacement_object", in, out, GPU_builtin(GPU_OBJECT_MATRIX));
        }
        else {
 -              return GPU_stack_link(mat, "node_vector_displacement_world", in, out);
 +              return GPU_stack_link(mat, node, "node_vector_displacement_world", in, out);
        }
  }