docs.unity.cn
    Show / Hide Table of Contents

    Class DepthOfField

    This class holds settings for the Depth of Field effect.

    Inheritance
    Object
    PostProcessEffectSettings
    DepthOfField
    Inherited Members
    PostProcessEffectSettings.active
    PostProcessEffectSettings.enabled
    PostProcessEffectSettings.SetAllOverridesTo(Boolean, Boolean)
    PostProcessEffectSettings.GetHash()
    Namespace: UnityEngine.Rendering.PostProcessing
    Syntax
    public sealed class DepthOfField : PostProcessEffectSettings

    Fields

    aperture

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

    Declaration
    public FloatParameter aperture
    Field Value
    Type Description
    FloatParameter

    focalLength

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

    Declaration
    public FloatParameter focalLength
    Field Value
    Type Description
    FloatParameter

    focusDistance

    The distance to the point of focus.

    Declaration
    public FloatParameter focusDistance
    Field Value
    Type Description
    FloatParameter

    kernelSize

    The convolution kernel size of the bokeh filter, which determines the maximum radius of bokeh. It also affects the performance (the larger the kernel is, the longer the GPU time is required).

    Declaration
    public KernelSizeParameter kernelSize
    Field Value
    Type Description
    KernelSizeParameter

    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

    true if the effect is currently enabled and supported

    Overrides
    PostProcessEffectSettings.IsEnabledAndSupported(PostProcessRenderContext)
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Thursday, April 14, 2022
    Terms of use