[Bf-blender-cvs] [ccfb98511b5] master: GPencil: Fix Control points of primitives clampoed by Stencil

Antonioya noreply at git.blender.org
Thu Jun 27 16:06:02 CEST 2019


Commit: ccfb98511b5032394d12880d6ebd91d39707f51a
Author: Antonioya
Date:   Thu Jun 27 16:05:42 2019 +0200
Branches: master
https://developer.blender.org/rBccfb98511b5032394d12880d6ebd91d39707f51a

GPencil: Fix Control points of primitives clampoed by Stencil

The control points were clamped to the stroke thickness due the last stencil change.

Now, the shading group is not clamped.

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

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 7df28bb9730..b41085868d1 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -1596,7 +1596,8 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data,
     DRWShadingGroup *shgrp = DRW_shgroup_create(e_data->gpencil_edit_point_sh, psl->drawing_pass);
     const float *viewport_size = DRW_viewport_size_get();
     DRW_shgroup_uniform_vec2(shgrp, "Viewport", viewport_size, 1);
-
+    /* Disable stencil for this type */
+    DRW_shgroup_state_disable(shgrp, DRW_STATE_WRITE_STENCIL | DRW_STATE_STENCIL_NEQUAL);
     stl->g_data->batch_buffer_ctrlpoint = DRW_gpencil_get_buffer_ctrlpoint_geom(gpd);
 
     DRW_shgroup_call(shgrp, stl->g_data->batch_buffer_ctrlpoint, NULL);



More information about the Bf-blender-cvs mailing list