Blender Git Commit Log

Git Commits -> Revision 57bb575

Revision 57bb575 by Antonio Vazquez (master)
June 26, 2019, 11:38 (GMT)
Fix T65958: GPencil glitches in line strokes with alpha

Following @fclem comments, I have implemented the use of Stencil for Solid line strokes. For Dots, Boxes and Lines with texture, the stencil is not activated because "kill" some artistic effects.

We have done test in greasepencil-object branch and all it's working as expected and the FPS are equal, so the stencil hasn't any appreciable impact in the drawing time.

The Stencil is used in groups of 255 and the passes are done in the same way. If the stencil is not use for the type of stroke (Dot/Box/Texture), the drawing is grouped as much as possible to reduce GPU overhead and limit the times the stencil bit must be cleared.

For doing this patch I had to add 2 new functions for reading private data to Draw manager. We decided add these function as a temporary solution while the Draw Manager implements the option to clear the stencil by groups. When this option will be implemented, these functions must be removed.

Thanks to Cl�ment for his help and support. It's always a pleasure working with him.

Review by: @fclem
Testers: @mendio @pepeland
See D5126 for more details

Commit Details:

Full Hash: 57bb575aa85e82ef10159e67d33a0b27ce6d9246
Parent Commit: 9dea691
Lines Changed: +136, -20

3 Modified Paths:

/source/blender/draw/engines/gpencil/gpencil_draw_utils.c (+49, -0) (Diff)
/source/blender/draw/engines/gpencil/gpencil_engine.c (+85, -19) (Diff)
/source/blender/draw/engines/gpencil/gpencil_engine.h (+2, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021