Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.Close
For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.Close
The Screen Space Ambient Occlusion (SSAO) image effect approximates Ambient Occlusion in realtime, as an image post-processing effect. It darkens creases, holes and surfaces that are close to each other. In real life, such areas tend to block out or occlude ambient light, hence they appear darker.
For a modern implementation of real-time ambient occlusion, have a look at the newer Screenspace Ambient Obscurance effect.
|The maximum “radius” of a gap that will introduce ambient occlusion.
|Number of ambient occlusion samples. A higher count will give better quality but with a higher processing overhead.
|The degree of darkness added by ambient occlusion.
|Amount of blur to apply to the darkening. No blur (0) is much faster but the darkened areas will be noisy.
|The resolution at which calculations should be performed (for example, a downsampling value of 2 will work at half the screen resolution). Downsampling increases rendering speed at the cost of quality.
|How fast occlusion should attenuate with distance.
|Try increasing this value if there are artifacts.
SSAO approximates ambient occlusion using an image processing effect. Its cost depends purely on screen resolution and SSAO parameters and does not depend on scene complexity as true AO would. However, the approximation tends to introduce artifacts. For example, objects that are outside of the screen do not contribute to occlusion and the amount of occlusion is dependent on viewing angle and camera position.
Note that SSAO is quite expensive in terms of processing time and generally should only be used on high-end graphics cards. Using SSAO will cause Unity to render the depth+normals texture of the camera which increases the number of draw calls and has a CPU processing overhead. However, the depth+normals texture then can be used for other effects as well (eg, Depth of Field). Once the texture is generated, the remainder of the SSAO effect is performed on the graphics card.
This effect requires a graphics card that supports Shader Model 3 and depth textures. See the Graphics Hardware Capabilities and Emulation page for further details and a list of compliant hardware.