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
    VolumeComponent
    DepthOfField
    Implements
    IApplyRevertPropertyContextMenuItemProvider
    IPostProcessComponent
    Inherited Members
    VolumeComponent.active
    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)
    VolumeComponent.displayName
    VolumeComponent.parameters
    Namespace: UnityEngine.Rendering.Universal
    Assembly: solution.dll
    Syntax
    public sealed class DepthOfField : VolumeComponent, IApplyRevertPropertyContextMenuItemProvider, IPostProcessComponent

    Fields

    aperture

    The ratio of aperture (known as f-stop or f-number). The smaller the value is, the shallower the depth of field is.

    Declaration
    public ClampedFloatParameter aperture
    Field Value
    Type Description
    ClampedFloatParameter

    bladeCount

    The number of aperture blades.

    Declaration
    public ClampedIntParameter bladeCount
    Field Value
    Type Description
    ClampedIntParameter

    bladeCurvature

    The curvature of aperture blades. The smaller the value is, the more visible aperture blades are. A value of 1 will make the bokeh perfectly circular.

    Declaration
    public ClampedFloatParameter bladeCurvature
    Field Value
    Type Description
    ClampedFloatParameter

    bladeRotation

    The rotation of aperture blades in degrees.

    Declaration
    public ClampedFloatParameter bladeRotation
    Field Value
    Type Description
    ClampedFloatParameter

    focalLength

    The distance between the lens and the film. The larger the value is, the shallower the depth of field is.

    Declaration
    public ClampedFloatParameter focalLength
    Field Value
    Type Description
    ClampedFloatParameter

    focusDistance

    The distance to the point of focus.

    Declaration
    public MinFloatParameter focusDistance
    Field Value
    Type Description
    MinFloatParameter

    gaussianEnd

    The distance at which the blurring will reach its maximum radius.

    Declaration
    public MinFloatParameter gaussianEnd
    Field Value
    Type Description
    MinFloatParameter

    gaussianMaxRadius

    The maximum radius of the gaussian blur. Values above 1 may show under-sampling artifacts.

    Declaration
    public ClampedFloatParameter gaussianMaxRadius
    Field Value
    Type Description
    ClampedFloatParameter

    gaussianStart

    The distance at which the blurring will start.

    Declaration
    public MinFloatParameter gaussianStart
    Field Value
    Type Description
    MinFloatParameter

    highQualitySampling

    Use higher quality sampling to reduce flickering and improve the overall blur smoothness.

    Declaration
    public BoolParameter highQualitySampling
    Field Value
    Type Description
    BoolParameter

    mode

    Use this to select Focusing modes for the depth of field effect.

    Declaration
    public DepthOfFieldModeParameter mode
    Field Value
    Type Description
    DepthOfFieldModeParameter

    Methods

    IsActive()

    Tells if the post process needs to be rendered or not.

    Declaration
    public bool IsActive()
    Returns
    Type Description
    bool

    True if the component is active, otherwise false.

    IsTileCompatible()

    Tells if the post process can run the effect on-tile or if it needs a full pass.

    Declaration
    public bool IsTileCompatible()
    Returns
    Type Description
    bool

    True if it can run on-tile, otherwise false.

    Implements

    IApplyRevertPropertyContextMenuItemProvider
    IPostProcessComponent
    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)