Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-08-03 11:29:53 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-08-05 15:45:09 +0300
commit8659e62d1e6371c115f2b5fdf7f82b70db73d720 (patch)
tree14207894b5b6951082f1bd740d79640f31a8ad99 /source/blender/draw/engines/eevee_next/eevee_depth_of_field.cc
parentc5526dc6f490492bd0beb78c42e4f04acb4d3047 (diff)
EEVEE-Next: Depth Of Field: Make slight focus max coc more accurate
This moves the slight focus max in tile from the setup pass to the resolve pass. This reduces complexity as there is no need for an extra component in the tile textures. This also avoids skipping any pixels and makes sure the local max matches the dispatched local group size. This should make the resolve pass a little bit faster.
Diffstat (limited to 'source/blender/draw/engines/eevee_next/eevee_depth_of_field.cc')
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_depth_of_field.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/draw/engines/eevee_next/eevee_depth_of_field.cc b/source/blender/draw/engines/eevee_next/eevee_depth_of_field.cc
index 26129192d9e..69f06da1782 100644
--- a/source/blender/draw/engines/eevee_next/eevee_depth_of_field.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_depth_of_field.cc
@@ -354,7 +354,6 @@ void DepthOfField::tiles_dilate_pass_sync()
DRW_shgroup_uniform_image_ref(grp, "in_tiles_bg_img", &tiles_bg_tx_.previous());
DRW_shgroup_uniform_image_ref(grp, "out_tiles_fg_img", &tiles_fg_tx_.current());
DRW_shgroup_uniform_image_ref(grp, "out_tiles_bg_img", &tiles_bg_tx_.current());
- DRW_shgroup_uniform_bool(grp, "dilate_slight_focus", &tiles_dilate_slight_focus_, 1);
DRW_shgroup_uniform_int(grp, "ring_count", &tiles_dilate_ring_count_, 1);
DRW_shgroup_uniform_int(grp, "ring_width_multiplier", &tiles_dilate_ring_width_mul_, 1);
DRW_shgroup_call_compute_ref(grp, dispatch_tiles_dilate_size_);
@@ -573,9 +572,9 @@ void DepthOfField::render(GPUTexture **input_tx, GPUTexture **output_tx)
DRW_stats_group_start("Tile Prepare");
/* WARNING: If format changes, make sure dof_tile_* GLSL constants are properly encoded. */
- tiles_fg_tx_.previous().acquire(tile_res, GPU_RGBA16F);
+ tiles_fg_tx_.previous().acquire(tile_res, GPU_R11F_G11F_B10F);
tiles_bg_tx_.previous().acquire(tile_res, GPU_R11F_G11F_B10F);
- tiles_fg_tx_.current().acquire(tile_res, GPU_RGBA16F);
+ tiles_fg_tx_.current().acquire(tile_res, GPU_R11F_G11F_B10F);
tiles_bg_tx_.current().acquire(tile_res, GPU_R11F_G11F_B10F);
DRW_draw_pass(tiles_flatten_ps_);
@@ -592,9 +591,6 @@ void DepthOfField::render(GPUTexture **input_tx, GPUTexture **output_tx)
/* This algorithm produce the exact dilation radius by dividing it in multiple passes. */
int dilation_radius = 0;
while (dilation_radius < dilation_end_radius) {
- /* Dilate slight focus only on first iteration. */
- tiles_dilate_slight_focus_ = (dilation_radius == 0) ? 1 : 0;
-
int remainder = dilation_end_radius - dilation_radius;
/* Do not step over any unvisited tile. */
int max_multiplier = dilation_radius + 1;