[Bf-blender-cvs] [1ea17f5c9e3] greasepencil-object: GPencil: Disable Stencil for Dots and Fill shading groups
Antonioya
noreply at git.blender.org
Tue Jun 18 17:42:23 CEST 2019
Commit: 1ea17f5c9e32a80f5ba8a1bb517f78e4376ad397
Author: Antonioya
Date: Tue Jun 18 17:41:25 2019 +0200
Branches: greasepencil-object
https://developer.blender.org/rB1ea17f5c9e32a80f5ba8a1bb517f78e4376ad397
GPencil: Disable Stencil for Dots and Fill shading groups
This types don't need stencil check because the stencil "kill" artistic effects.
===================================================================
M source/blender/draw/engines/gpencil/gpencil_draw_utils.c
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index a78f07513b0..dc06e7f33a7 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -1709,9 +1709,10 @@ static void DRW_gpencil_shgroups_create(GPENCIL_e_data *e_data,
stl->storage->shgroup_id++;
start_point = elm->vertex_idx;
- /* set stencil mask id */
- DRW_shgroup_stencil_mask(shgrp, stencil_id);
- stencil_id++;
+ /* Disable stencil for this type */
+ DRW_shgroup_state_disable(shgrp, DRW_STATE_WRITE_STENCIL | DRW_STATE_STENCIL_NEQUAL);
+ /* set stencil mask id as not used */
+ DRW_shgroup_stencil_mask(shgrp, 0x00f);
break;
}
case eGpencilBatchGroupType_Fill: {
@@ -1734,9 +1735,10 @@ static void DRW_gpencil_shgroups_create(GPENCIL_e_data *e_data,
stl->storage->shgroup_id++;
start_fill = elm->vertex_idx;
- /* set stencil mask id */
- DRW_shgroup_stencil_mask(shgrp, stencil_id);
- stencil_id++;
+ /* Disable stencil for this type */
+ DRW_shgroup_state_disable(shgrp, DRW_STATE_WRITE_STENCIL | DRW_STATE_STENCIL_NEQUAL);
+ /* set stencil mask id as not used */
+ DRW_shgroup_stencil_mask(shgrp, 0x00f);
break;
}
case eGpencilBatchGroupType_Edit: {
More information about the Bf-blender-cvs
mailing list