Commit: 7d954885ffae4de5a9586f8febcb42f715bc4349
Author: Antonio Vazquez
Date:   Sat Jun 23 18:42:58 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB7d954885ffae4de5a9586f8febcb42f715bc4349

Fix z-depth error drawing new strokes

The new strokes must be on top of any other stroke.

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

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 a21359805e2..b62f52bdced 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -362,7 +362,7 @@ void GPENCIL_cache_init(void *vedata)
                /* drawing buffer pass for drawing the stroke that is beeing 
drawing by the user. The data
                 * is stored in sbuffer
                 */
-               psl->drawing_pass = DRW_pass_create("GPencil Drawing Pass", 
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND | DRW_STATE_WRITE_DEPTH | 
DRW_STATE_DEPTH_LESS);
+               psl->drawing_pass = DRW_pass_create("GPencil Drawing Pass", 
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND | DRW_STATE_WRITE_DEPTH | 
DRW_STATE_DEPTH_ALWAYS);
 
                /* full screen pass to combine the result with default 
framebuffer */
                struct Gwn_Batch *quad = DRW_cache_fullscreen_quad_get();

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to