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:
Diffstat (limited to 'source/blender/gpu/shaders/material/gpu_shader_material_object_info.glsl')
-rw-r--r--source/blender/gpu/shaders/material/gpu_shader_material_object_info.glsl16
1 files changed, 7 insertions, 9 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 607cf119b36..2dd2993ceb0 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
@@ -1,7 +1,4 @@
-void node_object_info(mat4 obmat,
- vec4 obcolor,
- vec4 info,
- float mat_index,
+void node_object_info(float mat_index,
out vec3 location,
out vec4 color,
out float alpha,
@@ -9,10 +6,11 @@ void node_object_info(mat4 obmat,
out float material_index,
out float random)
{
- location = obmat[3].xyz;
- color = obcolor;
- alpha = obcolor.w;
- object_index = info.x;
+ location = ModelMatrix[3].xyz;
+ color = ObjectColor;
+ alpha = ObjectColor.a;
+ object_index = ObjectInfo.x;
+ /* TODO(fclem): Put that inside the Material UBO. */
material_index = mat_index;
- random = info.z;
+ random = ObjectInfo.z;
}