Support Vertex Color in GLSL viewport for Cycles
authorSergey Sharybin <sergey.vfx@gmail.com>
Sun, 22 May 2016 16:24:53 +0000 (18:24 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 23 May 2016 08:23:43 +0000 (10:23 +0200)
commita830280688b43e9c73e5a16dbe9d180720eb624f
tree3db9db2e88cd465af655f9346f58c3b97efebd78
parenta2669b0cbff0dc02729a7246ac29642aca84929e
Support Vertex Color in GLSL viewport for Cycles

The title says it all actually.

Added special custom data type, because we don't know in advance
whether we're referencing UV or Color layer. Also made it so vertex
attributes are normalized.

TODO: Border render in viewport ignores the normalization of the
attribute array for some reason, will be looked into still.

Reviewers: mont29, brecht, campbellbarton

Reviewed By: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D2022
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/gpu/intern/gpu_buffers.c
source/blender/gpu/shaders/gpu_shader_material.glsl
source/blender/makesdna/DNA_customdata_types.h
source/blender/nodes/shader/nodes/node_shader_attribute.c