Class AmbientOcclusion
This class holds settings for the Ambient Occlusion effect.
Inherited Members
Namespace: UnityEngine.Rendering.PostProcessing
Syntax
[Serializable]
public sealed class AmbientOcclusion : PostProcessEffectSettings
Fields
ambientOnly
Only affects ambient lighting. This mode is only available with the Deferred rendering path and HDR rendering. Objects rendered with the Forward rendering path won't get any ambient occlusion.
Declaration
[Tooltip("Check this box to mark this Volume as to only affect ambient lighting. This mode is only available with the Deferred rendering path and HDR rendering. Objects rendered with the Forward rendering path won't get any ambient occlusion.")]
public BoolParameter ambientOnly
Field Value
Type | Description |
---|---|
BoolParameter |
blurTolerance
The tolerance of the bilateral blur filter to depth changes.
Declaration
[Range(-8F, -1F)]
public FloatParameter blurTolerance
Field Value
Type | Description |
---|---|
FloatParameter |
color
A custom color to use for the ambient occlusion.
Declaration
[ColorUsage(false)]
[Tooltip("The custom color to use for the ambient occlusion. The default is black.")]
public ColorParameter color
Field Value
Type | Description |
---|---|
ColorParameter |
directLightingStrength
Modifies he influence of direct lighting on ambient occlusion. This is only used in the HD Render Pipeline currently.
Declaration
[Range(0F, 1F)]
[Tooltip("Modifies the influence of direct lighting on ambient occlusion.")]
public FloatParameter directLightingStrength
Field Value
Type | Description |
---|---|
FloatParameter |
intensity
The degree of darkness added by ambient occlusion.
Declaration
[Range(0F, 4F)]
[Tooltip("The degree of darkness added by ambient occlusion. Higher values produce darker areas.")]
public FloatParameter intensity
Field Value
Type | Description |
---|---|
FloatParameter |
mode
The ambient occlusion method to use.
Declaration
[Tooltip("The ambient occlusion method to use. \"Multi Scale Volumetric Obscurance\" is higher quality and faster on desktop & console platforms but requires compute shader support.")]
public AmbientOcclusionModeParameter mode
Field Value
Type | Description |
---|---|
AmbientOcclusionModeParameter |
noiseFilterTolerance
The tolerance of the noise filter to changes in the depth pyramid.
Declaration
[Range(-8F, 0F)]
public FloatParameter noiseFilterTolerance
Field Value
Type | Description |
---|---|
FloatParameter |
quality
The number of sample points, which affects quality and performance. Lowest, Low and Medium passes are downsampled. High and Ultra are not and should only be used on high-end hardware.
Declaration
[Tooltip("The number of sample points. This affects both quality and performance. For \"Lowest\", \"Low\", and \"Medium\", passes are downsampled. For \"High\" and \"Ultra\", they are not and therefore you should only \"High\" and \"Ultra\" on high-end hardware.")]
public AmbientOcclusionQualityParameter quality
Field Value
Type | Description |
---|---|
AmbientOcclusionQualityParameter |
radius
Radius of sample points, which affects extent of darkened areas.
Declaration
[Tooltip("The radius of sample points. This affects the size of darkened areas.")]
public FloatParameter radius
Field Value
Type | Description |
---|---|
FloatParameter |
thicknessModifier
Modifies the thickness of occluders. This increases dark areas but also introduces dark halo around objects.
Declaration
[Range(1F, 10F)]
[Tooltip("This modifies the thickness of occluders. It increases the size of dark areas and also introduces a dark halo around objects.")]
public FloatParameter thicknessModifier
Field Value
Type | Description |
---|---|
FloatParameter |
upsampleTolerance
The tolerance of the upsampling pass to depth changes.
Declaration
[Range(-12F, -1F)]
public FloatParameter upsampleTolerance
Field Value
Type | Description |
---|---|
FloatParameter |
zBias
Add a bias distance to sampled depth in AO to reduce self-shadowing aliasing artifacts.
Declaration
[Range(0F, 0.001F)]
[Tooltip("Add a bias distance to sampled depth in AO to reduce self-shadowing aliasing artifacts. ")]
public FloatParameter zBias
Field Value
Type | Description |
---|---|
FloatParameter |
Methods
IsEnabledAndSupported(PostProcessRenderContext)
Returns true
if the effect is currently enabled and supported.
Declaration
public override bool IsEnabledAndSupported(PostProcessRenderContext context)
Parameters
Type | Name | Description |
---|---|---|
PostProcessRenderContext | context | The current post-processing render context |
Returns
Type | Description |
---|---|
Boolean |
|