diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-01-28 20:49:00 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-01-29 17:05:51 +0300 |
commit | 314ea1b1c7dde85052130cfc0af9bec2f359e710 (patch) | |
tree | 7e3c96d6c191d48dc78d40a4ac31964f84986288 /source/blender/draw/engines/workbench/workbench_private.h | |
parent | 475a07cd0c67c4a72bb042ee5eb2af730bddb9cd (diff) |
Workbench: Depth Of Field: Improve noise and Large radius
- Add noise to remove undersampling artifact
- Create 2 mipmaps to the scene color buffer in order to have bigger blurs
- Replace blur2 with a 3x3 median filter that doesn't dilate the highlights
- Use temporal accumulation to remove noise
For some reason all of this exacerbate some bleeding issues happening on
far foreground elements from near foreground elements. The actual problem
was already happening before but was not really noticeable. It needs some
more work to be fixed.
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_private.h')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_private.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_private.h b/source/blender/draw/engines/workbench/workbench_private.h index ef114370587..35cd9571711 100644 --- a/source/blender/draw/engines/workbench/workbench_private.h +++ b/source/blender/draw/engines/workbench/workbench_private.h @@ -108,6 +108,8 @@ typedef struct WORKBENCH_FramebufferList { } WORKBENCH_FramebufferList; typedef struct WORKBENCH_TextureList { + struct GPUTexture *dof_source_tx; + struct GPUTexture *coc_halfres_tx; struct GPUTexture *history_buffer_tx; struct GPUTexture *depth_buffer_tx; } WORKBENCH_TextureList; @@ -138,6 +140,7 @@ typedef struct WORKBENCH_PassList { struct DRWPass *ghost_resolve_pass; struct DRWPass *effect_aa_pass; struct DRWPass *dof_down_ps; + struct DRWPass *dof_down2_ps; struct DRWPass *dof_flatten_v_ps; struct DRWPass *dof_flatten_h_ps; struct DRWPass *dof_dilate_h_ps; @@ -235,9 +238,7 @@ typedef struct WORKBENCH_PrivateData { float ssao_settings[4]; /* Dof */ - struct GPUTexture *half_res_col_tx; struct GPUTexture *dof_blur_tx; - struct GPUTexture *coc_halfres_tx; struct GPUTexture *coc_temp_tx; struct GPUTexture *coc_tiles_tx[2]; struct GPUUniformBuffer *dof_ubo; @@ -337,7 +338,7 @@ int workbench_taa_calculate_num_iterations(WORKBENCH_Data *vedata); /* workbench_effect_dof.c */ void workbench_dof_engine_init(WORKBENCH_Data *vedata, Object *camera); void workbench_dof_engine_free(void); -void workbench_dof_create_pass(WORKBENCH_Data *vedata, GPUTexture **dof_input); +void workbench_dof_create_pass(WORKBENCH_Data *vedata, GPUTexture **dof_input, GPUTexture *noise_tex); void workbench_dof_draw_pass(WORKBENCH_Data *vedata); /* workbench_materials.c */ |