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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-05-22 19:24:53 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-05-23 11:23:43 +0300
commita830280688b43e9c73e5a16dbe9d180720eb624f (patch)
tree3db9db2e88cd465af655f9346f58c3b97efebd78 /source/blender/nodes
parenta2669b0cbff0dc02729a7246ac29642aca84929e (diff)
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
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_attribute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_attribute.c b/source/blender/nodes/shader/nodes/node_shader_attribute.c
index 61bdfb3dfd6..0a69593cf07 100644
--- a/source/blender/nodes/shader/nodes/node_shader_attribute.c
+++ b/source/blender/nodes/shader/nodes/node_shader_attribute.c
@@ -45,9 +45,9 @@ static void node_shader_init_attribute(bNodeTree *UNUSED(ntree), bNode *node)
static int node_shader_gpu_attribute(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
NodeShaderAttribute *attr = node->storage;
- GPUNodeLink *mtface = GPU_attribute(CD_MTFACE, attr->name);
+ GPUNodeLink *cd_attr = GPU_attribute(CD_AUTO_FROM_NAME, attr->name);
- return GPU_stack_link(mat, "node_attribute", in, out, mtface);
+ return GPU_stack_link(mat, "node_attribute", in, out, cd_attr);
}
/* node type definition */