API

Class DepthOfFieldEffect

The depth of field effect applies a blur to objects that are closer or further from where the camera is focusing.

Hierarchy (View Summary)

Index
  • Creates a new instance DepthOfFieldEffect

    Parameters

    • sceneOrEngine: any

      The scene or engine the effect belongs to.

    • depthTexture: Nullable<RenderTargetTexture>

      The depth texture of the scene to compute the circle of confusion.This must be set in order for this to function but may be set after initialization if needed.

    • blurLevel: DepthOfFieldEffectBlurLevel = DepthOfFieldEffectBlurLevel.Low
    • pipelineTextureType: number = 0

      The type of texture to be used when performing the post processing.

    • blockCompilation: boolean = false

      If compilation of the shader should not be done in the constructor. The updateEffect method can be used to compile the shader at a later time. (default: false)

    • depthNotNormalized: boolean = false

      If the depth from the depth texture is already normalized or if the normalization should be done at runtime in the shader (default: false)

    Returns DepthOfFieldEffect