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_object_info.cc')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_object_info.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_object_info.cc b/source/blender/nodes/shader/nodes/node_shader_object_info.cc
index 03c1a018d37..8985ab6d0e9 100644
--- a/source/blender/nodes/shader/nodes/node_shader_object_info.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_object_info.cc
@@ -23,15 +23,8 @@ static int node_shader_gpu_object_info(GPUMaterial *mat,
{
Material *ma = GPU_material_get_material(mat);
float index = ma ? ma->index : 0.0f;
- return GPU_stack_link(mat,
- node,
- "node_object_info",
- in,
- out,
- GPU_builtin(GPU_OBJECT_MATRIX),
- GPU_builtin(GPU_OBJECT_COLOR),
- GPU_builtin(GPU_OBJECT_INFO),
- GPU_constant(&index));
+ GPU_material_flag_set(mat, GPU_MATFLAG_OBJECT_INFO);
+ return GPU_stack_link(mat, node, "node_object_info", in, out, GPU_constant(&index));
}
} // namespace blender::nodes::node_shader_object_info_cc