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.
This commit is contained in:
Germano Cavalcante 2022-06-28 13:13:48 -03:00 committed by Thomas Dinges
parent 92d1fab5cf
commit 9410d7bd2e
Notes: blender-bot 2023-02-14 00:06:52 +01:00
Referenced by issue #98882, Regression: Gradient colors in a Grease Pencil material change depending on the visibility of other objects
Referenced by issue #98661, 3.2: Potential candidates for corrective releases
1 changed files with 1 additions and 1 deletions

View File

@ -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;