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:
authorEthan-Hall <Ethan1080>2022-03-07 19:34:52 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-03-07 19:35:48 +0300
commit5b4ab896634fd118cb46740f6f90e45f96d550ac (patch)
treefbe8bae09fd3c9bcc75176621c2b434dd5690282 /intern/cycles/kernel/osl/shaders
parent76f9d83a19b9804f3f8997c35f4f77ace2d6fcbc (diff)
Shader Nodes: add Alpha output to Object Info node
An alpha component can be specified for an object's color. This adds an alpha socket to the object info shader node allowing for the alpha component of the object's color to be accessed in the shader editor. Differential Revision: https://developer.blender.org/D14141
Diffstat (limited to 'intern/cycles/kernel/osl/shaders')
-rw-r--r--intern/cycles/kernel/osl/shaders/node_object_info.osl2
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/kernel/osl/shaders/node_object_info.osl b/intern/cycles/kernel/osl/shaders/node_object_info.osl
index 37e545f9988..8ed73231213 100644
--- a/intern/cycles/kernel/osl/shaders/node_object_info.osl
+++ b/intern/cycles/kernel/osl/shaders/node_object_info.osl
@@ -5,12 +5,14 @@
shader node_object_info(output point Location = point(0.0, 0.0, 0.0),
output color Color = color(1.0, 1.0, 1.0),
+ output float Alpha = 1.0,
output float ObjectIndex = 0.0,
output float MaterialIndex = 0.0,
output float Random = 0.0)
{
getattribute("object:location", Location);
getattribute("object:color", Color);
+ getattribute("object:alpha", Alpha);
getattribute("object:index", ObjectIndex);
getattribute("material:index", MaterialIndex);
getattribute("object:random", Random);