Fix: EEVEE: Film: Sub-optimal sampling at lower filter size
The `sample_disk` returns samples inside a disk of radius 1 which was spanning 2 pixels. The blackmann-haris filter has not much energy at the edge of the filter and since we don't importance sample the filter, we have very low weight samples at some time steps. Improve this by biasing the distribution towards the center. This is a temporary solution until we have proper importance sample of the filtering function for this case. Fix #123630
This commit is contained in:
@@ -553,7 +553,10 @@ float2 Film::pixel_jitter_get() const
|
||||
* distribution covering the filter shape. This avoids putting samples in areas without any
|
||||
* weights. */
|
||||
/* TODO(fclem): Importance sampling could be a better option here. */
|
||||
jitter = Sampling::sample_disk(jitter) * data_.filter_radius;
|
||||
/* NOTE: We bias the disk to encompass most of the energy of the filter to avoid energy issues
|
||||
* with motion blur at low sample. */
|
||||
const float bias = 0.5f;
|
||||
jitter = Sampling::sample_disk(jitter) * bias * data_.filter_radius;
|
||||
}
|
||||
else {
|
||||
/* Jitter the size of a whole pixel. [-0.5..0.5] */
|
||||
|
||||
Reference in New Issue
Block a user