Class PostProcessEffectSettings | Post Processing | 2.3.0
docs.unity3d.com
    Show / Hide Table of Contents

    Class PostProcessEffectSettings

    The base class for all post-processing effect settings. Any ParameterOverride members found in this class will be automatically handled and interpolated by the volume framework.

    Inheritance
    Object
    PostProcessEffectSettings
    AmbientOcclusion
    AutoExposure
    Bloom
    ChromaticAberration
    ColorGrading
    DepthOfField
    Grain
    LensDistortion
    MotionBlur
    ScreenSpaceReflections
    Vignette
    Namespace: UnityEngine.Rendering.PostProcessing
    Syntax
    [Serializable]
    public class PostProcessEffectSettings : ScriptableObject
    Examples
    [Serializable]
    [PostProcess(typeof(ExampleRenderer), "Custom/ExampleEffect")]
    public sealed class ExampleEffect : PostProcessEffectSettings
    {
        [Range(0f, 1f), Tooltip("Effect intensity.")]
        public FloatParameter intensity = new FloatParameter { value = 0f };
    
        public override bool IsEnabledAndSupported(PostProcessRenderContext context)
        {
            return enabled.value
                && intensity.value > 0f; // Only render the effect if intensity is greater than 0
        }
    }

    Fields

    active

    The active state of the set of parameter defined in this class.

    Declaration
    public bool active
    Field Value
    Type Description
    Boolean
    See Also
    enabled

    enabled

    The true state of the effect override in the stack. Setting this to false will disable rendering for this effect assuming a volume with a higher priority doesn't override it to true.

    Declaration
    public BoolParameter enabled
    Field Value
    Type Description
    BoolParameter

    Methods

    GetHash()

    Returns the computed hash code for this parameter.

    Declaration
    public int GetHash()
    Returns
    Type Description
    Int32

    A computed hash code

    IsEnabledAndSupported(PostProcessRenderContext)

    Returns true if the effect is currently enabled and supported.

    Declaration
    public virtual bool IsEnabledAndSupported(PostProcessRenderContext context)
    Parameters
    Type Name Description
    PostProcessRenderContext context

    The current post-processing render context

    Returns
    Type Description
    Boolean

    true if the effect is currently enabled and supported

    SetAllOverridesTo(Boolean, Boolean)

    Sets all the overrides for this effect to a given value.

    Declaration
    public void SetAllOverridesTo(bool state, bool excludeEnabled = true)
    Parameters
    Type Name Description
    Boolean state

    The value to set the override states to

    Boolean excludeEnabled

    If false, the enabled field will also be set to the given value.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023