diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-11 15:37:27 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-14 11:57:03 +0300 |
commit | 2d28df783a029ee5b64da005b2fa400e4e8de976 (patch) | |
tree | 52761ab5351a3db388482029625e3c0526044037 /source/blender/gpu/shaders | |
parent | 642c8010b210e1671f4faa0ca1c097c77f19042a (diff) |
GPU: Move Material index to nodetree evaluation
This removes the need to pass the Material* all over the place in the draw
manager. Cleanup comming right after.
Diffstat (limited to 'source/blender/gpu/shaders')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_material.glsl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index 03999b2277c..023870125c9 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -3234,6 +3234,7 @@ void node_light_falloff( void node_object_info(mat4 obmat, vec4 info, + float mat_index, out vec3 location, out float object_index, out float material_index, @@ -3241,7 +3242,7 @@ void node_object_info(mat4 obmat, { location = obmat[3].xyz; object_index = info.x; - material_index = info.y; + material_index = mat_index; random = info.z; } |