[Bf-blender-cvs] [270ed1c7164] master: Fix T98882: Regression: Gradient colors in a Grease Pencil material change depending on the visibility of other objects

Germano Cavalcante noreply at git.blender.org
Tue Jun 28 18:14:04 CEST 2022


Commit: 270ed1c7164c2da47b27e4403bf44554a80ed71c
Author: Germano Cavalcante
Date:   Tue Jun 28 13:13:48 2022 -0300
Branches: master
https://developer.blender.org/rB270ed1c7164c2da47b27e4403bf44554a80ed71c

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.

===================================================================

M	source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl

===================================================================

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;



More information about the Bf-blender-cvs mailing list