BlurIsBilateral Property |
Namespace: DigitalRune.Graphics.PostProcessing
Joint bilateral filtering (= edge-aware filtering) can be enabled to blur surfaces in a 3D scene and prevent filtering across object boundaries and depth discontinuities.
Bilateral filtering means that the filter kernels is only applied to pixels that are close (e.g. geometric similarity or photometric similarity). In this case the sample weights (e.g. the Gaussian weights) are scaled by a range function. Joint or cross bilateral filtering means that the range function is applied to a second image instead of the image that is being processed.
When IsBilateral is enabled the depth of each sample is read from the depth buffer (G-buffer 0). The sample weights are weighted based on the depth difference to the current pixel. Samples near the current pixel (small depth difference) contribute more than distant samples (large depth difference).