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:
authorOmarSquircleArt <omar.squircleart@gmail.com>2019-08-22 15:26:09 +0300
committerOmarSquircleArt <omar.squircleart@gmail.com>2019-08-22 15:26:09 +0300
commit08ab3cbcce1eb9c2de4953a83b50cabc44479d3c (patch)
treeef169595562509b0e3338cecb36a3b3210bd64ce /source/blender/gpu/shaders
parenta2443848646cdb5d13980157a8c62eb4cd578388 (diff)
Shading: Add object color to Object Info node.
The object color property is added as an additional output in the Object Info node. Reviewers: brecht Differential Revision: https://developer.blender.org/D5554
Diffstat (limited to 'source/blender/gpu/shaders')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index acd28789364..24fef4f05d8 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -3629,14 +3629,17 @@ void node_light_falloff(
}
void node_object_info(mat4 obmat,
+ vec4 obcolor,
vec4 info,
float mat_index,
out vec3 location,
+ out vec4 color,
out float object_index,
out float material_index,
out float random)
{
location = obmat[3].xyz;
+ color = obcolor;
object_index = info.x;
material_index = mat_index;
random = info.z;