diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-08-03 11:29:53 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-08-05 15:45:09 +0300 |
commit | 8659e62d1e6371c115f2b5fdf7f82b70db73d720 (patch) | |
tree | 14207894b5b6951082f1bd740d79640f31a8ad99 | |
parent | c5526dc6f490492bd0beb78c42e4f04acb4d3047 (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.
8 files changed, 80 insertions, 127 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; diff --git a/source/blender/draw/engines/eevee_next/eevee_depth_of_field.hh b/source/blender/draw/engines/eevee_next/eevee_depth_of_field.hh index 8d62e0c0784..e1c9d3117e3 100644 --- a/source/blender/draw/engines/eevee_next/eevee_depth_of_field.hh +++ b/source/blender/draw/engines/eevee_next/eevee_depth_of_field.hh @@ -81,7 +81,6 @@ class DepthOfField { DRWPass *tiles_flatten_ps_ = nullptr; /** Dilates the min & max CoCs to cover maximum COC values. */ - bool1 tiles_dilate_slight_focus_ = false; int tiles_dilate_ring_count_ = -1; int tiles_dilate_ring_width_mul_ = -1; int3 dispatch_tiles_dilate_size_ = int3(-1); @@ -136,9 +135,6 @@ class DepthOfField { /** Extent of the input buffer. */ int2 extent_; - /** Reduce pass info. */ - int reduce_steps_; - public: DepthOfField(Instance &inst) : inst_(inst){}; ~DepthOfField(){}; diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_lib.glsl index 8a5d11ddc56..f89da641446 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_lib.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_lib.glsl @@ -180,24 +180,12 @@ struct CocTile { float fg_min_coc; float fg_max_coc; float fg_max_intersectable_coc; - float fg_slight_focus_max_coc; float bg_min_coc; float bg_max_coc; float bg_min_intersectable_coc; }; -struct CocTilePrediction { - bool do_foreground; - bool do_slight_focus; - bool do_focus; - bool do_background; - bool do_hole_fill; -}; - /* WATCH: Might have to change depending on the texture format. */ -const float dof_tile_defocus = 0.25; -const float dof_tile_focus = 0.0; -const float dof_tile_mixed = 0.75; const float dof_tile_large_coc = 1024.0; /* Init a CoC tile for reduction algorithms. */ @@ -207,20 +195,18 @@ CocTile dof_coc_tile_init() tile.fg_min_coc = 0.0; tile.fg_max_coc = -dof_tile_large_coc; tile.fg_max_intersectable_coc = dof_tile_large_coc; - tile.fg_slight_focus_max_coc = -1.0; tile.bg_min_coc = dof_tile_large_coc; tile.bg_max_coc = 0.0; tile.bg_min_intersectable_coc = dof_tile_large_coc; return tile; } -CocTile dof_coc_tile_unpack(vec4 fg, vec3 bg) +CocTile dof_coc_tile_unpack(vec3 fg, vec3 bg) { CocTile tile; tile.fg_min_coc = -fg.x; tile.fg_max_coc = -fg.y; tile.fg_max_intersectable_coc = -fg.z; - tile.fg_slight_focus_max_coc = fg.w; tile.bg_min_coc = bg.x; tile.bg_max_coc = bg.y; tile.bg_min_intersectable_coc = bg.z; @@ -231,15 +217,14 @@ CocTile dof_coc_tile_unpack(vec4 fg, vec3 bg) * parameters. Workaround by using defines. */ #define dof_coc_tile_load(tiles_fg_img_, tiles_bg_img_, texel_) \ dof_coc_tile_unpack( \ - imageLoad(tiles_fg_img_, clamp(texel_, ivec2(0), imageSize(tiles_fg_img_) - 1)), \ + imageLoad(tiles_fg_img_, clamp(texel_, ivec2(0), imageSize(tiles_fg_img_) - 1)).xyz, \ imageLoad(tiles_bg_img_, clamp(texel_, ivec2(0), imageSize(tiles_bg_img_) - 1)).xyz) -void dof_coc_tile_pack(CocTile tile, out vec4 out_fg, out vec3 out_bg) +void dof_coc_tile_pack(CocTile tile, out vec3 out_fg, out vec3 out_bg) { out_fg.x = -tile.fg_min_coc; out_fg.y = -tile.fg_max_coc; out_fg.z = -tile.fg_max_intersectable_coc; - out_fg.w = tile.fg_slight_focus_max_coc; out_bg.x = tile.bg_min_coc; out_bg.y = tile.bg_max_coc; out_bg.z = tile.bg_min_intersectable_coc; @@ -247,10 +232,10 @@ void dof_coc_tile_pack(CocTile tile, out vec4 out_fg, out vec3 out_bg) #define dof_coc_tile_store(tiles_fg_img_, tiles_bg_img_, texel_out_, tile_data_) \ if (true) { \ - vec4 out_fg; \ + vec3 out_fg; \ vec3 out_bg; \ dof_coc_tile_pack(tile_data_, out_fg, out_bg); \ - imageStore(tiles_fg_img_, texel_out_, out_fg); \ + imageStore(tiles_fg_img_, texel_out_, out_fg.xyzz); \ imageStore(tiles_bg_img_, texel_out_, out_bg.xyzz); \ } @@ -269,6 +254,18 @@ bool dof_do_fast_gather(float max_absolute_coc, float min_absolute_coc, const bo return (max_absolute_coc - min_absolute_coc) < (DOF_FAST_GATHER_COC_ERROR * max_absolute_coc); } +struct CocTilePrediction { + bool do_foreground; + bool do_slight_focus; + bool do_focus; + bool do_background; + bool do_hole_fill; +}; + +/** + * Using the tile CoC infos, predict which convolutions are required and the ones that can be + * skipped. + */ CocTilePrediction dof_coc_tile_prediction_get(CocTile tile) { /* Based on tile value, predict what pass we need to load. */ @@ -277,15 +274,13 @@ CocTilePrediction dof_coc_tile_prediction_get(CocTile tile) predict.do_foreground = (-tile.fg_min_coc > dof_layer_threshold - dof_layer_offset_fg); bool fg_fully_opaque = predict.do_foreground && dof_do_fast_gather(-tile.fg_min_coc, -tile.fg_max_coc, true); - - predict.do_slight_focus = !fg_fully_opaque && (tile.fg_slight_focus_max_coc >= 0.5); - predict.do_focus = !fg_fully_opaque && (tile.fg_slight_focus_max_coc == dof_tile_focus); - - predict.do_background = !predict.do_focus && !fg_fully_opaque && + predict.do_background = !fg_fully_opaque && (tile.bg_max_coc > dof_layer_threshold - dof_layer_offset); bool bg_fully_opaque = predict.do_background && dof_do_fast_gather(-tile.bg_max_coc, tile.bg_min_coc, false); - predict.do_hole_fill = !predict.do_focus && !fg_fully_opaque && -tile.fg_min_coc > 0.0; + predict.do_hole_fill = !fg_fully_opaque && -tile.fg_min_coc > 0.0; + predict.do_focus = !fg_fully_opaque; + predict.do_slight_focus = !fg_fully_opaque; #if 0 /* Debug */ predict.do_foreground = predict.do_background = predict.do_hole_fill = true; @@ -293,20 +288,6 @@ CocTilePrediction dof_coc_tile_prediction_get(CocTile tile) return predict; } -/* Special function to return the correct max value of 2 slight focus coc. */ -float dof_coc_max_slight_focus(float coc1, float coc2) -{ - /* Do not consider values below 0.5 for expansion as they are "encoded". - * See setup pass shader for more infos. */ - if ((coc1 == dof_tile_defocus && coc2 == dof_tile_focus) || - (coc1 == dof_tile_focus && coc2 == dof_tile_defocus)) { - /* Tile where completely out of focus and in focus are both present. - * Consider as very slightly out of focus. */ - return dof_tile_mixed; - } - return max(coc1, coc2); -} - /** \} */ /* -------------------------------------------------------------------- */ diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_resolve_comp.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_resolve_comp.glsl index 3bb89bd7e0f..2efcf43a0f6 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_resolve_comp.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_resolve_comp.glsl @@ -10,22 +10,68 @@ #pragma BLENDER_REQUIRE(eevee_depth_of_field_accumulator_lib.glsl) +shared uint shared_max_slight_focus_abs_coc; + +/** + * Returns The max CoC in the Slight Focus range inside this compute tile. + */ +float dof_slight_focus_coc_tile_get(vec2 frag_coord) +{ + if (all(equal(gl_LocalInvocationID, uvec3(0)))) { + shared_max_slight_focus_abs_coc = floatBitsToUint(0.0); + } + barrier(); + + float local_abs_max = 0.0; + /* Sample in a cross (X) pattern. This covers all pixels over the whole tile, as long as + * dof_max_slight_focus_radius is less than the group size. */ + for (int i = 0; i < 4; i++) { + vec2 sample_uv = (frag_coord + quad_offsets[i] * 2.0 * dof_max_slight_focus_radius) / + vec2(textureSize(color_tx, 0)); + float coc = dof_coc_from_depth(dof_buf, sample_uv, textureLod(depth_tx, sample_uv, 0.0).r); + if (abs(coc) < dof_max_slight_focus_radius) { + local_abs_max = max(local_abs_max, abs(coc)); + } + } + /* Use atomic reduce operation. */ + atomicMax(shared_max_slight_focus_abs_coc, floatBitsToUint(local_abs_max)); + /* "Broadcast" result accross all threads. */ + barrier(); + + return uintBitsToFloat(shared_max_slight_focus_abs_coc); +} + void main() { vec2 frag_coord = vec2(gl_GlobalInvocationID.xy) + 0.5; ivec2 tile_co = ivec2(frag_coord / float(DOF_TILES_SIZE * 2)); + CocTile coc_tile = dof_coc_tile_load(in_tiles_fg_img, in_tiles_bg_img, tile_co); CocTilePrediction prediction = dof_coc_tile_prediction_get(coc_tile); + vec2 uv = frag_coord / vec2(textureSize(color_tx, 0)); + vec2 uv_halfres = (frag_coord * 0.5) / vec2(textureSize(color_bg_tx, 0)); + + float slight_focus_max_coc = 0.0; + if (prediction.do_slight_focus) { + slight_focus_max_coc = dof_slight_focus_coc_tile_get(frag_coord); + prediction.do_slight_focus = slight_focus_max_coc > 0.5; + if (prediction.do_slight_focus) { + prediction.do_focus = false; + } + } + + if (prediction.do_focus) { + float center_coc = (dof_coc_from_depth(dof_buf, uv, textureLod(depth_tx, uv, 0.0).r)); + prediction.do_focus = abs(center_coc) <= 0.5; + } + vec4 out_color = vec4(0.0); float weight = 0.0; vec4 layer_color; float layer_weight; - vec2 uv = frag_coord / vec2(textureSize(color_tx, 0)); - vec2 uv_halfres = (frag_coord * 0.5) / vec2(textureSize(color_bg_tx, 0)); - if (!no_hole_fill_pass && prediction.do_hole_fill) { layer_color = textureLod(color_hole_fill_tx, uv_halfres, 0.0); layer_weight = textureLod(weight_hole_fill_tx, uv_halfres, 0.0).r; @@ -48,12 +94,8 @@ void main() } if (!no_slight_focus_pass && prediction.do_slight_focus) { - dof_slight_focus_gather(depth_tx, - color_tx, - bokeh_lut_tx, - coc_tile.fg_slight_focus_max_coc, - layer_color, - layer_weight); + dof_slight_focus_gather( + depth_tx, color_tx, bokeh_lut_tx, slight_focus_max_coc, layer_color, layer_weight); /* Composite slight defocus. */ out_color = out_color * (1.0 - layer_weight) + layer_color; weight = weight * (1.0 - layer_weight) + layer_weight; @@ -79,7 +121,7 @@ void main() out_color.a = 1.0; } - if (debug_resolve_perf && coc_tile.fg_slight_focus_max_coc >= 0.5) { + if (debug_resolve_perf && prediction.do_slight_focus) { out_color.rgb *= vec3(1.0, 0.1, 0.1); } diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_setup_comp.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_setup_comp.glsl index 99fc42f5d98..c017a5aa965 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_setup_comp.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_setup_comp.glsl @@ -15,26 +15,6 @@ #pragma BLENDER_REQUIRE(common_view_lib.glsl) #pragma BLENDER_REQUIRE(eevee_depth_of_field_lib.glsl) -float dof_abs_max_slight_of_focus_coc(vec4 cocs) -{ - /* Clamp to 0.5 if full in defocus to differentiate full focus tiles with coc == 0.0. - * This enables an optimization in the resolve pass. */ - const vec4 threshold = vec4(dof_layer_threshold + dof_layer_offset); - cocs = abs(cocs); - bvec4 defocus = greaterThan(cocs, threshold); - bvec4 focus = lessThanEqual(cocs, vec4(0.5)); - if (any(defocus) && any(focus)) { - /* For the same reason as in the flatten pass. This is a case we cannot optimize for. */ - cocs = mix(cocs, vec4(dof_tile_mixed), focus); - cocs = mix(cocs, vec4(dof_tile_mixed), defocus); - } - else { - cocs = mix(cocs, vec4(dof_tile_focus), focus); - cocs = mix(cocs, vec4(dof_tile_defocus), defocus); - } - return max_v4(cocs); -} - void main() { vec2 fullres_texel_size = 1.0 / vec2(textureSize(color_tx, 0).xy); @@ -61,8 +41,6 @@ void main() vec4 out_color = weighted_sum_array(colors, weights); imageStore(out_color_img, out_texel, out_color); - vec2 out_coc; - out_coc.x = dot(cocs, weights); - out_coc.y = dof_abs_max_slight_of_focus_coc(cocs); - imageStore(out_coc_img, out_texel, out_coc.xyxy); + float out_coc = dot(cocs, weights); + imageStore(out_coc_img, out_texel, vec4(out_coc)); } diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_tiles_dilate_comp.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_tiles_dilate_comp.glsl index db99e9e4fba..dba8b5fd79d 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_tiles_dilate_comp.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_tiles_dilate_comp.glsl @@ -37,11 +37,6 @@ void main() /* Actually gather the "absolute" biggest coc but keeping the sign. */ ring_buckets[ring].fg_min_coc = min(ring_buckets[ring].fg_min_coc, adj_tile.fg_min_coc); ring_buckets[ring].bg_max_coc = max(ring_buckets[ring].bg_max_coc, adj_tile.bg_max_coc); - - if (dilate_slight_focus) { - ring_buckets[ring].fg_slight_focus_max_coc = dof_coc_max_slight_focus( - ring_buckets[ring].fg_slight_focus_max_coc, adj_tile.fg_slight_focus_max_coc); - } } else { /* DILATE_MODE_MIN_ABS */ ring_buckets[ring].fg_max_coc = max(ring_buckets[ring].fg_max_coc, adj_tile.fg_max_coc); @@ -65,12 +60,6 @@ void main() /* Load center tile. */ CocTile out_tile = dof_coc_tile_load(in_tiles_fg_img, in_tiles_bg_img, center_tile_pos); - /* Dilate once. */ - if (dilate_slight_focus) { - out_tile.fg_slight_focus_max_coc = dof_coc_max_slight_focus( - out_tile.fg_slight_focus_max_coc, ring_buckets[0].fg_slight_focus_max_coc); - } - for (int ring = 0; ring < ring_count && ring < DOF_DILATE_RING_COUNT; ring++) { float ring_distance = float(ring + 1); diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_tiles_flatten_comp.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_tiles_flatten_comp.glsl index 2a0787ec69f..88737ade386 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_tiles_flatten_comp.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_tiles_flatten_comp.glsl @@ -26,11 +26,6 @@ shared uint bg_min_coc; shared uint bg_max_coc; shared uint bg_min_intersectable_coc; -shared uint fg_slight_focus_max_coc; -shared uint fg_slight_focus_flag; - -const uint slight_focus_flag_defocus = 1u; -const uint slight_focus_flag_focus = 2u; const uint dof_tile_large_coc_uint = floatBitsToUint(dof_tile_large_coc); void main() @@ -43,9 +38,6 @@ void main() bg_min_coc = dof_tile_large_coc_uint; bg_max_coc = floatBitsToUint(0.0); bg_min_intersectable_coc = dof_tile_large_coc_uint; - /* Should be -1.0 but we want to avoid the sign bit in float representation. */ - fg_slight_focus_max_coc = floatBitsToUint(0.0); - fg_slight_focus_flag = 0u; } barrier(); @@ -64,17 +56,6 @@ void main() atomicMax(bg_max_coc, bg_coc); atomicMin(bg_min_intersectable_coc, (sample_coc > 0.0) ? bg_coc : dof_tile_large_coc_uint); - /* Mimics logic of dof_coc_max_slight_focus(). */ - float sample_slight_focus_coc = sample_data.y; - if (sample_slight_focus_coc == dof_tile_defocus) { - atomicOr(fg_slight_focus_flag, slight_focus_flag_defocus); - } - else if (sample_slight_focus_coc == dof_tile_focus) { - atomicOr(fg_slight_focus_flag, slight_focus_flag_focus); - } - /* Add 1 in order to compare signed floats in [-1..1] range. */ - atomicMax(fg_slight_focus_max_coc, floatBitsToUint(sample_slight_focus_coc + 1.0)); - barrier(); if (all(equal(gl_LocalInvocationID.xy, uvec2(0)))) { @@ -91,15 +72,6 @@ void main() tile.bg_max_coc = uintBitsToFloat(bg_max_coc); tile.bg_min_intersectable_coc = uintBitsToFloat(bg_min_intersectable_coc); - /* Mimics logic of dof_coc_max_slight_focus(). */ - if (fg_slight_focus_flag == (slight_focus_flag_defocus | slight_focus_flag_focus)) { - tile.fg_slight_focus_max_coc = dof_tile_mixed; - } - else { - /* Remove the 1 bias. */ - tile.fg_slight_focus_max_coc = uintBitsToFloat(fg_slight_focus_max_coc) - 1.0; - } - ivec2 tile_co = ivec2(gl_WorkGroupID.xy); dof_coc_tile_store(out_tiles_fg_img, out_tiles_bg_img, tile_co, tile); } diff --git a/source/blender/draw/engines/eevee_next/shaders/infos/eevee_depth_of_field_info.hh b/source/blender/draw/engines/eevee_next/shaders/infos/eevee_depth_of_field_info.hh index 75436940ef2..c95c0877c88 100644 --- a/source/blender/draw/engines/eevee_next/shaders/infos/eevee_depth_of_field_info.hh +++ b/source/blender/draw/engines/eevee_next/shaders/infos/eevee_depth_of_field_info.hh @@ -79,18 +79,17 @@ GPU_SHADER_CREATE_INFO(eevee_depth_of_field_tiles_flatten) .local_group_size(DOF_TILES_FLATTEN_GROUP_SIZE, DOF_TILES_FLATTEN_GROUP_SIZE) .additional_info("eevee_shared", "draw_view") .sampler(0, ImageType::FLOAT_2D, "coc_tx") - .image(2, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "out_tiles_fg_img") + .image(2, GPU_R11F_G11F_B10F, Qualifier::WRITE, ImageType::FLOAT_2D, "out_tiles_fg_img") .image(3, GPU_R11F_G11F_B10F, Qualifier::WRITE, ImageType::FLOAT_2D, "out_tiles_bg_img") .compute_source("eevee_depth_of_field_tiles_flatten_comp.glsl"); GPU_SHADER_CREATE_INFO(eevee_depth_of_field_tiles_dilate) .additional_info("eevee_shared", "draw_view", "eevee_depth_of_field_tiles_common") .local_group_size(DOF_TILES_DILATE_GROUP_SIZE, DOF_TILES_DILATE_GROUP_SIZE) - .image(2, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "out_tiles_fg_img") + .image(2, GPU_R11F_G11F_B10F, Qualifier::WRITE, ImageType::FLOAT_2D, "out_tiles_fg_img") .image(3, GPU_R11F_G11F_B10F, Qualifier::WRITE, ImageType::FLOAT_2D, "out_tiles_bg_img") .push_constant(Type::INT, "ring_count") .push_constant(Type::INT, "ring_width_multiplier") - .push_constant(Type::BOOL, "dilate_slight_focus") .compute_source("eevee_depth_of_field_tiles_dilate_comp.glsl"); GPU_SHADER_CREATE_INFO(eevee_depth_of_field_tiles_dilate_minabs) @@ -104,7 +103,7 @@ GPU_SHADER_CREATE_INFO(eevee_depth_of_field_tiles_dilate_minmax) .additional_info("eevee_depth_of_field_tiles_dilate"); GPU_SHADER_CREATE_INFO(eevee_depth_of_field_tiles_common) - .image(0, GPU_RGBA16F, Qualifier::READ, ImageType::FLOAT_2D, "in_tiles_fg_img") + .image(0, GPU_R11F_G11F_B10F, Qualifier::READ, ImageType::FLOAT_2D, "in_tiles_fg_img") .image(1, GPU_R11F_G11F_B10F, Qualifier::READ, ImageType::FLOAT_2D, "in_tiles_bg_img"); /** \} */ |