docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DepthOfField

    A volume component that holds settings for the Depth Of Field effect.

    Inheritance
    object
    Object
    ScriptableObject
    VolumeComponent
    VolumeComponentWithQuality
    DepthOfField
    Implements
    IApplyRevertPropertyContextMenuItemProvider
    IPostProcessComponent
    Inherited Members
    VolumeComponentWithQuality.quality
    VolumeComponent.active
    VolumeComponent.displayName
    VolumeComponent.parameters
    VolumeComponent.Override(VolumeComponent, float)
    VolumeComponent.SetAllOverridesTo(bool)
    VolumeComponent.GetHashCode()
    VolumeComponent.AnyPropertiesIsOverridden()
    VolumeComponent.Release()
    VolumeComponent.TryGetRevertMethodForFieldName(SerializedProperty, out Action<SerializedProperty>)
    VolumeComponent.GetSourceTerm()
    VolumeComponent.TryGetApplyMethodForFieldName(SerializedProperty, out Action<SerializedProperty>)
    VolumeComponent.GetSourceName(Component)
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    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.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Rendering.HighDefinition
    Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
    Syntax
    [Serializable]
    [VolumeComponentMenu("Post-processing/Depth Of Field")]
    [SupportedOnRenderPipeline(typeof(HDRenderPipelineAsset))]
    public sealed class DepthOfField : VolumeComponentWithQuality, IApplyRevertPropertyContextMenuItemProvider, IPostProcessComponent

    Fields

    farFocusEnd

    Sets the distance from the Camera at which the far field blur reaches its maximum blur radius.

    Declaration
    [Tooltip("Sets the distance from the Camera at which the far field blur reaches its maximum blur radius.")]
    public MinFloatParameter farFocusEnd
    Field Value
    Type Description
    MinFloatParameter

    farFocusStart

    Sets the distance from the Camera at which the far field starts blurring.

    Declaration
    [Header("Far Range")]
    [Tooltip("Sets the distance from the Camera at which the far field starts blurring.")]
    public MinFloatParameter farFocusStart
    Field Value
    Type Description
    MinFloatParameter

    focusDistance

    The distance to the focus plane from the Camera.

    Declaration
    [Tooltip("The distance to the focus plane from the Camera.")]
    public MinFloatParameter focusDistance
    Field Value
    Type Description
    MinFloatParameter

    focusDistanceMode

    Specifies where to read the focus distance from.

    Declaration
    [Tooltip("Specifies where to read the focus distance from..")]
    public FocusDistanceModeParameter focusDistanceMode
    Field Value
    Type Description
    FocusDistanceModeParameter

    focusMode

    Specifies the mode that HDRP uses to set the focus for the depth of field effect.

    Declaration
    [Tooltip("Specifies the mode that HDRP uses to set the focus for the depth of field effect.")]
    public DepthOfFieldModeParameter focusMode
    Field Value
    Type Description
    DepthOfFieldModeParameter
    See Also
    DepthOfFieldMode

    nearFocusEnd

    Sets the distance from the Camera at which the near field does not blur anymore.

    Declaration
    [Tooltip("Sets the distance from the Camera at which the near field does not blur anymore.")]
    public MinFloatParameter nearFocusEnd
    Field Value
    Type Description
    MinFloatParameter

    nearFocusStart

    Sets the distance from the Camera at which the near field blur begins to decrease in intensity.

    Declaration
    [Header("Near Range")]
    [Tooltip("Sets the distance from the Camera at which the near field blur begins to decrease in intensity.")]
    public MinFloatParameter nearFocusStart
    Field Value
    Type Description
    MinFloatParameter

    Properties

    farMaxBlur

    Sets the maximum radius the far blur can reach.

    Declaration
    public float farMaxBlur { get; set; }
    Property Value
    Type Description
    float

    farSampleCount

    Sets the number of samples to use for the far field.

    Declaration
    public int farSampleCount { get; set; }
    Property Value
    Type Description
    int

    highQualityFiltering

    When enabled, HDRP uses bicubic filtering instead of bilinear filtering for the depth of field effect.

    Declaration
    public bool highQualityFiltering { get; set; }
    Property Value
    Type Description
    bool

    limitManualRangeNearBlur

    Adjust near blur CoC based on depth distance when manual, non-physical mode is used.

    Declaration
    public bool limitManualRangeNearBlur { get; set; }
    Property Value
    Type Description
    bool

    nearMaxBlur

    Sets the maximum radius the near blur can reach.

    Declaration
    public float nearMaxBlur { get; set; }
    Property Value
    Type Description
    float

    nearSampleCount

    Sets the number of samples to use for the near field.

    Declaration
    public int nearSampleCount { get; set; }
    Property Value
    Type Description
    int

    physicallyBased

    When enabled, HDRP uses a more accurate but slower physically based method to compute the depth of field effect.

    Declaration
    public bool physicallyBased { get; set; }
    Property Value
    Type Description
    bool

    resolution

    Specifies the resolution at which HDRP processes the depth of field effect.

    Declaration
    public DepthOfFieldResolution resolution { get; set; }
    Property Value
    Type Description
    DepthOfFieldResolution
    See Also
    DepthOfFieldResolution

    Methods

    IsActive()

    Tells if the effect needs to be rendered or not.

    Declaration
    public bool IsActive()
    Returns
    Type Description
    bool

    true if the effect should be rendered, false otherwise.

    IsFarLayerActive()

    Returns the state of the far field blur. This is only relevant when Manual is set.

    Declaration
    public bool IsFarLayerActive()
    Returns
    Type Description
    bool

    true if the far field blur is active and visible.

    IsNearLayerActive()

    Returns the state of the near field blur. This is only relevant when Manual is set.

    Declaration
    public bool IsNearLayerActive()
    Returns
    Type Description
    bool

    true if the near field blur is active and visible.

    Implements

    IApplyRevertPropertyContextMenuItemProvider
    UnityEngine.Rendering.IPostProcessComponent
    In This Article
    Back to top
    Copyright © 2024 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)