The distance, in units of scene space, at which ambient occlusion takes effect.
- iOS 11.0+
- macOS 10.13+
- Mac Catalyst 13.0+
- tvOS 11.0+
- watchOS 4.0+
Ambient occlusion is an effect that improves material shading by calculating the amounts of ambient light that reach various parts of a surface, creating shadows on parts of a geometry where incoming light is obscured by other parts of the geometry. (You can provide pre-rendered ambient occlusion effects for a material using its
ambient property.) Screen-space ambient occlusion (SSAO) provides a real-time approximation of this effect for the entire scene viewed through the camera.
SSAO effects work by storing relevant scene geometry information for each pixel, and using that information to produce per-pixel shading effects. This
screen property determines the area in scene space to consider around each pixel for determining the amount of incoming ambient light blocked by surrounding geometry (and thus the amount of shadow effect to apply). The default value is 5; smaller values cause SSAO effects to apply only to finer geometry details, while larger values affect coarser details.