Screen Space Ambient Occlusion (SSAO) is used for efficiently approximating the ambient occlusion effect in real-time. Compared to Global Illumination, Ambient Occlusion is less accurate as it only operates in screen space, but it has its advantages. Similar to other post-processing effects like SSR or DOF, it is important that geometries are writing to the Z-Buffer. Otherwise, they won't be affected by this technique. For each pixel, the Screen Space Ambient Occlusion samples the depth values around this pixel and tries to compute the amount of occlusion on this point.
If your graphic only contains static elements, we recommend to use the Ambient Occlusion option within the Global Illumination features. The quality is much better and more accurate. For any dynamic content, you should use the Screen Space Ambient Occlusion feature.
Ambient Occlusion OFF | Real Time Ambient Occlusion | Global Illumination Baked AO |
---|---|---|
Advantages/Disadvantages of Real Time Ambient Occlusion
Advantages | Disadvantages |
---|---|
No pre-processing/baking required | Inaccurate |
Works with dynamic objects | Performance impact |
Easy to use |
How to Use Ambient Occlusion
To use Ambient Occlusion, enable it in the Post Processing Effects. This is different from the Ambient Occlusion settings for the Classic Render Pipeline.
SSAO Parameters
Factor: Controls the strength of this effect.
Samples: Sets the number of rays used to gather AO information.
Range: Determines the maximum range of each sample-ray.
Culling: Determines how much irrelevant AO information surrounding geometry surfaces is discarded.
Threshold: Determines the threshold to remove artifacts on geometry edges.
Compensate: Compensates for edge artifacts.
Blur Kernel: Controls the quality of the blur.
K6 - K32: Normal blur kernels that blur the AO in an entire frame.
K1 - K2 (Edge-Aware): Bilateral blur kernels that consider geometry edges upon blurring. Performance impact is expected.
Blur Iterations: Controls how strong the AO gets blurred. This applies only to the Bilateral blur kernels.
Blur Factor: Controls how strong the AO gets blurred. This applies only to the Normal blur kernels.
Normal Blur - K12 | Bilateral Blur - K2 (Edge-Aware) |
---|---|