diff options
Diffstat (limited to 'source/blender/draw/engines/workbench/shaders/workbench_forward_transparent_accum_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/workbench/shaders/workbench_forward_transparent_accum_frag.glsl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_forward_transparent_accum_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_forward_transparent_accum_frag.glsl index e654141df5c..5eff0b41e20 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_forward_transparent_accum_frag.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_forward_transparent_accum_frag.glsl @@ -25,6 +25,9 @@ in vec3 normal_viewport; #ifdef V3D_SHADING_TEXTURE_COLOR in vec2 uv_interp; #endif +#ifdef V3D_SHADING_VERTEX_COLOR +in vec3 vertexColor; +#endif #ifdef V3D_LIGHTING_MATCAP uniform sampler2D matcapImage; #endif @@ -42,11 +45,13 @@ void main() { vec4 diffuse_color; -#ifdef V3D_SHADING_TEXTURE_COLOR +#if defined(V3D_SHADING_TEXTURE_COLOR) diffuse_color = workbench_sample_texture(image, uv_interp, imageSrgb, imageNearest); if (diffuse_color.a < ImageTransparencyCutoff) { discard; } +#elif defined(V3D_SHADING_VERTEX_COLOR) + diffuse_color = vec4(vertexColor, 1.0); #else diffuse_color = vec4(materialDiffuseColor, 1.0); #endif /* V3D_SHADING_TEXTURE_COLOR */ |