[Bf-blender-cvs] [54798961ff3] greasepencil-object: GPencil: Fix stroke textures not working because of material chunk reuse

Clément Foucault noreply at git.blender.org
Wed Mar 4 18:15:35 CET 2020


Commit: 54798961ff3a1ba06e37d99f3a2b73d4bd57bbb4
Author: Clément Foucault
Date:   Wed Mar 4 18:15:24 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rB54798961ff3a1ba06e37d99f3a2b73d4bd57bbb4

GPencil: Fix stroke textures not working because of material chunk reuse

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

M	source/blender/draw/engines/gpencil/gpencil_engine.c

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 50c9d012ced..dbc4b280f5e 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -494,7 +494,8 @@ static void gpencil_stroke_cache_populate(bGPDlayer *gpl,
 
   GPUUniformBuffer *ubo_mat;
   GPUTexture *tex_stroke, *tex_fill;
-  gpencil_material_resources_get(iter->matpool, gps->mat_nr, &tex_stroke, &tex_fill, &ubo_mat);
+  gpencil_material_resources_get(
+      iter->matpool, iter->mat_ofs + gps->mat_nr, &tex_stroke, &tex_fill, &ubo_mat);
 
   bool resource_changed = (iter->ubo_mat != ubo_mat) ||
                           (tex_fill && (iter->tex_fill != tex_fill)) ||



More information about the Bf-blender-cvs mailing list