[Bf-blender-cvs] [978de3c5423] temp-greasepencil-vfx: Set intermediate passes to DRW_STATE_DEPTH_ALWAYS
Antonio Vazquez
noreply at git.blender.org
Wed Jun 27 11:38:07 CEST 2018
Commit: 978de3c5423322b141aabad78dbfada0704137a1
Author: Antonio Vazquez
Date: Wed Jun 27 11:23:08 2018 +0200
Branches: temp-greasepencil-vfx
https://developer.blender.org/rB978de3c5423322b141aabad78dbfada0704137a1
Set intermediate passes to DRW_STATE_DEPTH_ALWAYS
This passes must write z-depth but don't need check it.
Note: This solves the FXAA problem too.
===================================================================
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 184fb9ecf91..5fbd5e1dbe9 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -245,17 +245,17 @@ static void GPENCIL_create_fx_shaders(void)
static void GPENCIL_create_fx_passes(GPENCIL_PassList *psl)
{
/* FX passes */
- psl->fx_blur_pass = DRW_pass_create("GPencil FX Blur Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
+ psl->fx_blur_pass = DRW_pass_create("GPencil FX Blur Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_ALWAYS);
- psl->fx_flip_pass = DRW_pass_create("GPencil FX Flip Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
+ psl->fx_flip_pass = DRW_pass_create("GPencil FX Flip Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_ALWAYS);
- psl->fx_light_pass = DRW_pass_create("GPencil FX Light Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
+ psl->fx_light_pass = DRW_pass_create("GPencil FX Light Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_ALWAYS);
- psl->fx_pixel_pass = DRW_pass_create("GPencil FX Pixel Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
+ psl->fx_pixel_pass = DRW_pass_create("GPencil FX Pixel Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_ALWAYS);
- psl->fx_swirl_pass = DRW_pass_create("GPencil FX Swirl Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
+ psl->fx_swirl_pass = DRW_pass_create("GPencil FX Swirl Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_ALWAYS);
- psl->fx_wave_pass = DRW_pass_create("GPencil FX Wave Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
+ psl->fx_wave_pass = DRW_pass_create("GPencil FX Wave Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_ALWAYS);
}
void GPENCIL_engine_init(void *vedata)
@@ -449,7 +449,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_LESS);
+ psl->mix_pass_noblend = DRW_pass_create("GPencil Mix Pass no blend", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_ALWAYS);
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.input_color_tx);
More information about the Bf-blender-cvs
mailing list