diff options
author | Ethan-Hall <Ethan1080> | 2022-03-07 19:34:52 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-03-07 19:35:48 +0300 |
commit | 5b4ab896634fd118cb46740f6f90e45f96d550ac (patch) | |
tree | fbe8bae09fd3c9bcc75176621c2b434dd5690282 /source/blender/gpu | |
parent | 76f9d83a19b9804f3f8997c35f4f77ace2d6fcbc (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 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/shaders/material/gpu_shader_material_object_info.glsl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_object_info.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_object_info.glsl index ff77b0beea2..607cf119b36 100644 --- a/source/blender/gpu/shaders/material/gpu_shader_material_object_info.glsl +++ b/source/blender/gpu/shaders/material/gpu_shader_material_object_info.glsl @@ -4,12 +4,14 @@ void node_object_info(mat4 obmat, float mat_index, out vec3 location, out vec4 color, + out float alpha, out float object_index, out float material_index, out float random) { location = obmat[3].xyz; color = obcolor; + alpha = obcolor.w; object_index = info.x; material_index = mat_index; random = info.z; |