Commit: 9ac96df2a34c69c7c460bdbf62696cad6355728c Author: Antonio Vazquez Date: Thu Jun 28 10:51:26 2018 +0200 Branches: temp-greasepencil-vfx https://developer.blender.org/rB9ac96df2a34c69c7c460bdbf62696cad6355728c
Fix issues of z-depth and clean temp framebuffer =================================================================== M source/blender/draw/engines/gpencil/gpencil_engine.c M source/blender/draw/engines/gpencil/gpencil_shader_fx.c =================================================================== diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c index c231decb42d..da252a92394 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.c +++ b/source/blender/draw/engines/gpencil/gpencil_engine.c @@ -244,18 +244,19 @@ static void GPENCIL_create_fx_shaders(void) static void GPENCIL_create_fx_passes(GPENCIL_PassList *psl) { + DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS; /* FX passes */ - 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_blur_pass = DRW_pass_create("GPencil FX Blur Pass", state); - 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_flip_pass = DRW_pass_create("GPencil FX Flip Pass", state); - 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_light_pass = DRW_pass_create("GPencil FX Light Pass", state); - 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_pixel_pass = DRW_pass_create("GPencil FX Pixel Pass", state); - 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_swirl_pass = DRW_pass_create("GPencil FX Swirl Pass", state); - psl->fx_wave_pass = DRW_pass_create("GPencil FX Wave Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_ALWAYS); + psl->fx_wave_pass = DRW_pass_create("GPencil FX Wave Pass", state); } void GPENCIL_engine_init(void *vedata) diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c index 11b21dd1f8e..e609b4f58f4 100644 --- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c +++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c @@ -476,9 +476,8 @@ static void gpencil_draw_fx_pass(GPENCIL_e_data *e_data, e_data->input_depth_tx = e_data->temp_depth_tx_b; e_data->input_color_tx = e_data->temp_color_tx_b; - /* do not need clear output because makes a full copy - * and replace al pixels */ GPU_framebuffer_bind(fbl->temp_fb_a); + GPU_framebuffer_clear_color_depth(fbl->temp_fb_a, clearcol, 1.0f); DRW_draw_pass(copypass); } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs