Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gpu_shader_material_object_info.glsl « material « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2dd2993ceb04fc3665fbbc240cc9839e491b9a23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
void node_object_info(float mat_index,
                      out vec3 location,
                      out vec4 color,
                      out float alpha,
                      out float object_index,
                      out float material_index,
                      out float random)
{
  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 = ObjectInfo.z;
}