[Bf-blender-cvs] [b41d293a96c] greasepencil-object: Set again mix pass to DEPTH_LESS

Antonio Vazquez noreply at git.blender.org
Thu Jun 28 09:12:43 CEST 2018


Commit: b41d293a96cc7350ed8f392bc978c099d1218c21
Author: Antonio Vazquez
Date:   Thu Jun 28 09:12:35 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBb41d293a96cc7350ed8f392bc978c099d1218c21

Set again mix pass to DEPTH_LESS

Using ALWAYS for this pass is wrong because when using several objects, only the less z-depth object is drawn.

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

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 6639e730a60..0cdbef47b59 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -379,7 +379,7 @@ void GPENCIL_cache_init(void *vedata)
 		 * This pass is used too to take the snapshot used for background_pass. This image
 		 * will be used as the background while the user is drawing.
 		 */
-		psl->mix_pass_noblend = DRW_pass_create("GPencil Mix Pass no blend", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_ALWAYS);
+		psl->mix_pass_noblend = DRW_pass_create("GPencil Mix Pass no blend", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
 		DRWShadingGroup *mix_shgrp_noblend = DRW_shgroup_create(e_data.gpencil_fullscreen_sh, psl->mix_pass_noblend);
 		DRW_shgroup_call_add(mix_shgrp_noblend, quad, NULL);
 		DRW_shgroup_uniform_texture_ref(mix_shgrp_noblend, "strokeColor", &e_data.temp_color_tx_a);



More information about the Bf-blender-cvs mailing list