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:
authorFabian Schempp <fabianschempp@googlemail.com>2022-04-18 23:28:08 +0300
committerFabian Schempp <fabianschempp@googlemail.com>2022-04-18 23:28:08 +0300
commit01616f9ed2da14b5cad40efac03d1a22dbb759f3 (patch)
tree4955ad12f260e557aa1c0f724a320e565f8bce5c /source/blender/nodes/shader/nodes/node_shader_object_info.cc
parentf06d361da1249c93568153bae88bcdf43b4774a1 (diff)
parent314b27850ccb6d103cf5c73855187cfc11ec48d8 (diff)
Merge branch 'master' into soc-2021-porting-modifiers-to-nodes-remesh-voxel
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