The properties of URP’s Screen Space Ambient OcclusionA method to approximate how much ambient light (light not coming from a specific direction) can hit a point on a surface.
See in Glossary (SSAO) renderer feature allow you to configure it to best suit the graphical and performance needs of a project.
This section describes the properties of the SSAO Renderer Feature.
This property defines the type of noise the SSAO effect uses.
Available Options:
Performance impact: Insignificant.
This property defines the intensity of the darkening effect.
Performance impact: Insignificant.
When Unity calculates the Ambient Occlusion value, the SSAO effect takes samples of the normal texture within this radius from the current pixelThe smallest unit in a computer image. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More info
See in Glossary.
Performance impact: High.
A lower Radius value improves performance, because the SSAO Renderer Feature samples pixels closer to the source pixel. This makes caching more efficient.
Calculating the Ambient Occlusion Pass on objects closer to the Camera takes longer than on objects further from the Camera. This is because the Radius property scales with the object.
SSAO does not apply to objects farther than this distance from the Camera.
A lower value increases performance in scenesA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary that contain many distant objects. The performance improvement is smaller in smaller scenes with fewer objects.
Performance impact: Depends on the application.
This property defines how visible the effect is in areas exposed to direct lighting.
These images show how the Direct Lighting Strength value changes the SSAO effect depending on whether they are in the shadow or not.
A. Shows the effect of Direct Lighting Strength on the SSAO effect in lit areas.
B. Shows the effect of Direct Lighting Strength on the SSAO effect in areas one or more shadows cover.
Performance impact: Insignificant.
Select the source of the normal vector values. The SSAO Renderer Feature uses normal vectors for calculating how exposed each point on a surface is to ambient lighting.
Available options:
DepthNormals
Pass. This option lets Unity make use of a more accurate normal texture.DepthNormals
Pass to generate the normal texture. SSAO reconstructs the normal vectors using the depth texture instead. Use this option only if you want to avoid using the DepthNormals
Pass block in your custom shadersA program that runs on the GPU. More infoPerformance impact: Depends on the application.
When you switch between the options Depth Normals and Depth, there might be a variation in performance, which depends on the target platform and the application. In a wide range of applications the difference in performance is small. In most cases, Depth Normals produce a better visual look.
For more information on the Source property, refer to the Implementation details.
This property becomes active when you select the option Depth in the Source property.
Higher quality of the normal vectors produces smoother SSAO effect.
Available options:
Performance impact: Medium.
In some scenarios, the Depth option produces results comparable with the Depth Normals option. But in certain cases, the Depth Normals option provides a significant increase in quality. The following images show an example of such case.
For more information, refer to the Implementation details.
Selecting this check box reduces the resolution of the Pass that calculates the Ambient Occlusion effect by a factor of two.
The reduction in resolution of the Ambient Occlusion Pass by a factor of two reduces the pixel count to process by a factor of four. This reduces the load on the GPU significantly, but makes the effect less detailed.
Performance impact: Very high.
When you enable After Opaque, Unity calculates and applies the SSAO effect after the opaque render pass. This can increase performance when used with Depth as the Source for normal vector values as Unity does not perform the skips depth prepass to calculate SSAO and instead uses the existing depth values. However this can cause over-darkening of the areas that receive baked occlusion and real-time occlusion.
After Opaque can also increase performance on mobile devices that use tile-based rendering.
Performance impact: Medium.
This property defines the quality of blur that Unity applies to the SSAO effect. Higher quality blur creates a smoother, higher fidelity effect but requires more processing power.
Available options:
Performance impact: Very high.
For each pixel, the SSAO Render Feature takes the selected number of samples within the specified radius to calculate the Ambient Occlusion value. A higher value makes the effect smoother and more detailed, but also reduces performance.
Available options:
Performance impact: High.
An increase in the Sample Count value from 4 to 8 doubles the computational load on the GPU.