EEVEE-Next: Depth Of Field: Use random sampling in slight focus gather

This replace the previous square rings approach by sampling a disk the
footprint of the search area. This avoids sampling in areas in corners
where there isn't any weight.

This results in much less samples needed to acheive a good enough result.
The max number of samples for an area of 11x11 px is hard coded to 16 and
still gives good results with the final clamp.

The number of samples is adaptative and is scaled by the search area (max
CoC).

The High Quality Slight Defocus is not required anymore. If there is a
quality parameter to add, it would be sample count option. But I consider
the temporal stability enough for viewport work and render can still
render many full scene samples. So I don't see a need for that yet.
This commit is contained in:
2022-08-05 13:51:29 +02:00
parent 3690dad40a
commit 2a4cc0c81c
8 changed files with 53 additions and 75 deletions

View File

@@ -267,7 +267,6 @@ class RENDER_PT_eevee_next_depth_of_field(RenderButtonsPanel, Panel):
col.prop(props, "bokeh_max_size")
col.prop(props, "bokeh_threshold")
col.prop(props, "bokeh_neighbor_max")
col.prop(props, "use_bokeh_high_quality_slight_defocus")
col.prop(props, "use_bokeh_jittered")
col = layout.column()