The source of noise
Before discussing Filters, we should first analyze why we need Filters. Obviously, Filters are used to reduce noise. So, is noise a type of error or bug?
Not quite, in fact, the source of the noise is Jitter. In order to sample more information, Lumen adds randomness to the direction of the Probe's Ray. This randomness is expressed in both time and space:
- In terms of time, the Jitter values are different for different frames, so the Probe at the same position will Trace in different directions.
- In terms of space, the direction of the Ray emitted by adjacent Probes is not completely parallel.
- Finally, even if the directions are completely the same, due to each Probe having only one Trace for a specific direction, the hit target may be completely different. Mixing the results of adjacent Probes is actually similar to sampling more rays for the same area and then mixing the results of the sampling.
In other words, each Probe actually obtains more independent information, rather than just obtaining redundant information. The latter actually wastes many Trace Rays.
The question is how to blend this information? Under what circumstances can we allow Probes to share their Trace results, and when do we need to reject them?
Filter
Size
For a normal Probe, the Filter's object is the four adjacent Probes in up, down, left, and right directions.
For a moved Probe, the Filter's object needs to be further expanded, as shown in the figure.
Weight
The weight of each Probe is controlled by the following factors:
- Position Weight: the difference in depth in screen space, the greater the difference, the lower the weight
- Angle Weight: determine whether to exclude the currently sampled information based on the angle
The principle here is that if the intersection point of the sampled Probe ray is very close, the information of this Ray should not be reused for the solid line ray below the Probe. This is because the actual ray corresponding to the intersection point should be the red ray in the left image.
In the right image, however, since the intersection point is farther away, the angle between the green ray from the intersection point and the solid line ray below it is smaller, so this information can be reused.