Class ScreenSpaceAmbientOcclusion
A volume component that holds settings for the ambient occlusion.
Inheritance
Implements
Inherited Members
Namespace: UnityEngine.Rendering.HighDefinition
Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
Syntax
[Serializable]
[VolumeComponentMenuForRenderPipeline("Lighting/Ambient Occlusion", new Type[] { typeof(HDRenderPipeline) })]
public sealed class ScreenSpaceAmbientOcclusion : VolumeComponentWithQuality, IApplyRevertPropertyContextMenuItemProvider
Fields
blurSharpness
Modify the non-temporal blur to change how sharp features are preserved. Lower values leads to blurrier/softer results, higher values gets a sharper result, but with the risk of noise.
Declaration
public ClampedFloatParameter blurSharpness
Field Value
Type | Description |
---|---|
ClampedFloatParameter |
directLightingStrength
Controls how much the ambient occlusion affects direct lighting.
Declaration
public ClampedFloatParameter directLightingStrength
Field Value
Type | Description |
---|---|
ClampedFloatParameter |
ghostingReduction
Moving this factor closer to 0 will increase the amount of accepted samples during temporal accumulation, increasing the ghosting, but reducing the temporal noise.
Declaration
public ClampedFloatParameter ghostingReduction
Field Value
Type | Description |
---|---|
ClampedFloatParameter |
intensity
Controls the strength of the ambient occlusion effect. Increase this value to produce darker areas.
Declaration
public ClampedFloatParameter intensity
Field Value
Type | Description |
---|---|
ClampedFloatParameter |
layerMask
Defines the layers that ray traced ambient occlusion should include.
Declaration
public LayerMaskParameter layerMask
Field Value
Type | Description |
---|---|
LayerMaskParameter |
occluderMotionRejection
When enabled, ambient occlusion generated by moving objects will not be accumulated, generating less ghosting but introducing additional noise.
Declaration
public BoolParameter occluderMotionRejection
Field Value
Type | Description |
---|---|
BoolParameter |
radius
Sampling radius. Bigger the radius, wider AO will be achieved, risking to lose fine details and increasing cost of the effect due to increasing cache misses.
Declaration
public ClampedFloatParameter radius
Field Value
Type | Description |
---|---|
ClampedFloatParameter |
rayTracing
Enable ray traced ambient occlusion.
Declaration
public BoolParameter rayTracing
Field Value
Type | Description |
---|---|
BoolParameter |
receiverMotionRejection
When enabled, ambient occlusion generated on moving objects will not be accumulated, generating less ghosting but introducing additional noise.
Declaration
public BoolParameter receiverMotionRejection
Field Value
Type | Description |
---|---|
BoolParameter |
spatialBilateralAggressiveness
Moving this factor closer to 0 will increase the amount of accepted samples during temporal accumulation, increasing the ghosting, but reducing the temporal noise.
Declaration
public ClampedFloatParameter spatialBilateralAggressiveness
Field Value
Type | Description |
---|---|
ClampedFloatParameter |
specularOcclusion
Controls the influence of the ambient occlusion on the specular occlusion.
Declaration
public ClampedFloatParameter specularOcclusion
Field Value
Type | Description |
---|---|
ClampedFloatParameter |
temporalAccumulation
Whether the results are accumulated over time or not. This can get higher quality results at a cheaper cost, but it can lead to temporal artifacts such as ghosting.
Declaration
public BoolParameter temporalAccumulation
Field Value
Type | Description |
---|---|
BoolParameter |
Properties
bilateralUpsample
This upsample method preserves sharp edges better, however may result in visible aliasing and it is slightly more expensive.
Declaration
public bool bilateralUpsample { get; set; }
Property Value
Type | Description |
---|---|
bool |
denoise
Defines if the ray traced ambient occlusion should be denoised.
Declaration
public bool denoise { get; set; }
Property Value
Type | Description |
---|---|
bool |
denoiserRadius
Controls the radius of the ray traced ambient occlusion denoiser.
Declaration
public float denoiserRadius { get; set; }
Property Value
Type | Description |
---|---|
float |
directionCount
Number of directions searched for occlusion at each each pixel when temporal accumulation is disabled.
Declaration
public int directionCount { get; set; }
Property Value
Type | Description |
---|---|
int |
fullResolution
If this option is set to true, the effect runs at full resolution. This will increases quality, but also decreases performance significantly.
Declaration
public bool fullResolution { get; set; }
Property Value
Type | Description |
---|---|
bool |
maximumRadiusInPixels
This field imposes a maximum radius in pixels that will be considered. It is very important to keep this as tight as possible to preserve good performance. Note that the pixel value specified for this field is the value used for 1080p when not running the effect at full resolution, it will be scaled accordingly for other resolutions.
Declaration
public int maximumRadiusInPixels { get; set; }
Property Value
Type | Description |
---|---|
int |
rayLength
Controls the length of ray traced ambient occlusion rays.
Declaration
public float rayLength { get; set; }
Property Value
Type | Description |
---|---|
float |
sampleCount
Number of samples for evaluating the effect.
Declaration
public int sampleCount { get; set; }
Property Value
Type | Description |
---|---|
int |
stepCount
Number of steps to take along one signed direction during horizon search (this is the number of steps in positive and negative direction). Increasing the value can lead to detection of finer details, but is not a guarantee of higher quality otherwise. Also note that increasing this value will lead to higher cost.
Declaration
public int stepCount { get; set; }
Property Value
Type | Description |
---|---|
int |