Cycles: add Object Info node, with outputs object location, object/material
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 21 May 2012 12:52:28 +0000 (12:52 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 21 May 2012 12:52:28 +0000 (12:52 +0000)
commitc3e1fce77552b5626d2939710cb6d0020891d218
tree5d59df38ec009f21000a959531129aa511868773
parentea11bc980ad428950efb430618a6de439ffd5951
Cycles: add Object Info node, with outputs object location, object/material
pass index, and a random number unique to the instance of the object.

This can be useful to give some variation to a single material assigned to
multiple instances, either manually controlled through the object index, based
on the object location, or randomized for each instance.

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Object_Info
20 files changed:
intern/cycles/blender/blender_object.cpp
intern/cycles/blender/blender_shader.cpp
intern/cycles/kernel/kernel_object.h
intern/cycles/kernel/kernel_shader.h
intern/cycles/kernel/svm/svm.h
intern/cycles/kernel/svm/svm_geometry.h
intern/cycles/kernel/svm/svm_types.h
intern/cycles/render/nodes.cpp
intern/cycles/render/nodes.h
intern/cycles/render/object.cpp
intern/cycles/render/object.h
intern/cycles/util/util_hash.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/intern/node.c
source/blender/gpu/shaders/gpu_shader_material.glsl
source/blender/gpu/shaders/gpu_shader_material.glsl.c
source/blender/makesrna/intern/rna_nodetree_types.h
source/blender/nodes/CMakeLists.txt
source/blender/nodes/NOD_shader.h
source/blender/nodes/shader/nodes/node_shader_object_info.c [new file with mode: 0644]