Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2022-06-28 19:13:48 +0300
committerThomas Dinges <blender@dingto.org>2022-06-30 17:07:45 +0300
commit9410d7bd2e9d8c5fc45341624ee5968490bca388 (patch)
tree07cfd94eaeab4338f3ec77e389615e3ae4f5978c
parent92d1fab5cf3e63b0522a43e5b605ca9927e58856 (diff)
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.
-rw-r--r--source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl2
1 files changed, 1 insertions, 1 deletions
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;