From 2ea82e86ca60c1c268c6074ecba10524cebd97ed Mon Sep 17 00:00:00 2001 From: OmarSquircleArt Date: Thu, 12 Sep 2019 17:42:13 +0200 Subject: Shading: Add Vertex Color node. This patch adds a new Vertex Color node. The node also returns the alpha of the vertex color layer as an output. Reviewers: brecht Differential Revision: https://developer.blender.org/D5767 --- source/blender/gpu/intern/gpu_material_library.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/gpu/intern/gpu_material_library.h') diff --git a/source/blender/gpu/intern/gpu_material_library.h b/source/blender/gpu/intern/gpu_material_library.h index 06544d27af9..3a38eb5c600 100644 --- a/source/blender/gpu/intern/gpu_material_library.h +++ b/source/blender/gpu/intern/gpu_material_library.h @@ -114,6 +114,7 @@ extern char datatoc_gpu_shader_material_vector_curves_glsl[]; extern char datatoc_gpu_shader_material_vector_displacement_glsl[]; extern char datatoc_gpu_shader_material_vector_math_glsl[]; extern char datatoc_gpu_shader_material_velvet_glsl[]; +extern char datatoc_gpu_shader_material_vertex_color_glsl[]; extern char datatoc_gpu_shader_material_volume_absorption_glsl[]; extern char datatoc_gpu_shader_material_volume_info_glsl[]; extern char datatoc_gpu_shader_material_volume_principled_glsl[]; @@ -527,6 +528,11 @@ static GPUMaterialLibrary gpu_shader_material_velvet_library = { .dependencies = {&gpu_shader_material_diffuse_library, NULL}, }; +static GPUMaterialLibrary gpu_shader_material_vertex_color_library = { + .code = datatoc_gpu_shader_material_vertex_color_glsl, + .dependencies = {NULL}, +}; + static GPUMaterialLibrary gpu_shader_material_volume_absorption_library = { .code = datatoc_gpu_shader_material_volume_absorption_glsl, .dependencies = {NULL}, @@ -638,6 +644,7 @@ static GPUMaterialLibrary *gpu_material_libraries[] = { &gpu_shader_material_vector_displacement_library, &gpu_shader_material_vector_math_library, &gpu_shader_material_velvet_library, + &gpu_shader_material_vertex_color_library, &gpu_shader_material_volume_absorption_library, &gpu_shader_material_volume_info_library, &gpu_shader_material_volume_principled_library, -- cgit v1.2.3