docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AmbientOcclusion

    This class holds settings for the Ambient Occlusion effect.

    Inheritance
    object
    Object
    ScriptableObject
    PostProcessEffectSettings
    AmbientOcclusion
    Inherited Members
    PostProcessEffectSettings.active
    PostProcessEffectSettings.enabled
    PostProcessEffectSettings.SetAllOverridesTo(bool, bool)
    PostProcessEffectSettings.GetHash()
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Rendering.PostProcessing
    Assembly: Unity.Postprocessing.Runtime.dll
    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(-8, -1)]
    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(0, 1)]
    [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(0, 4)]
    [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(-8, 0)]
    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(1, 10)]
    [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(-12, -1)]
    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(0, 0.001)]
    [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
    bool

    true if the effect is currently enabled and supported

    Overrides
    PostProcessEffectSettings.IsEnabledAndSupported(PostProcessRenderContext)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)