From 9410d7bd2e9d8c5fc45341624ee5968490bca388 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Tue, 28 Jun 2022 13:13:48 -0300 Subject: Fix T98882: Regression: Gradient colors in a Grease Pencil material change depending on the visibility of other objects The material ID was being wrongly passed in the shader. --- source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl index af8aec85598..5f5419bac47 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl @@ -125,7 +125,7 @@ void main() gpencil_color_output(fill_col, fcol_decode, 1.0, gp_mat._fill_texture_mix); gp_interp.mat_flag = gp_flag & GP_FILL_FLAGS; - gp_interp.mat_flag |= uint(ma1.x) << GPENCIl_MATID_SHIFT; + gp_interp.mat_flag |= uint(ma1.x + gpMaterialOffset) << GPENCIl_MATID_SHIFT; gp_interp.uv = mat2(gp_mat.fill_uv_rot_scale.xy, gp_mat.fill_uv_rot_scale.zw) * uv1.xy + gp_mat._fill_uv_offset; -- cgit v1.2.3