Class KawaseBlurPass

A Kawase blur pass.

Hierarchy (view full)

Constructors

  • Constructs a new Kawase blur pass.

    Parameters

    • Optional options: {
          height?: number;
          kernelSize?: KernelSize;
          resolutionScale?: number;
          resolutionX?: number;
          resolutionY?: number;
          width?: number;
      }

      The options.

      • Optional height?: number

        Deprecated. Use resolutionY instead.

      • Optional kernelSize?: KernelSize

        The blur kernel size.

      • Optional resolutionScale?: number

        The resolution scale.

      • Optional resolutionX?: number

        The horizontal resolution.

      • Optional resolutionY?: number

        The vertical resolution.

      • Optional width?: number

        Deprecated. Use resolutionX instead.

    Returns KawaseBlurPass

Properties

blurMaterial: KawaseBlurMaterial

The blur material.

camera: Camera

The camera.

dithering: boolean

Indicates whether dithering is enabled.

Deprecated

enabled: boolean

Indicates whether this pass is enabled.

kernelSize: KernelSize

The kernel size.

name: string

The name of this pass.

needsDepthTexture: boolean

Only relevant for subclassing.

Indicates whether the EffectComposer should prepare a depth texture for this pass. Set this to true if this pass relies on depth information from a preceding RenderPass.

needsSwap: boolean

Only relevant for subclassing.

Indicates whether the EffectComposer should swap the frame buffers after this pass has finished rendering. Set this to false if this pass doesn't render to the output buffer or the screen. Otherwise, the contents of the input buffer will be lost.

renderer: WebGLRenderer

The renderer.

Deprecated

resolution: Resolution
scene: Scene

The scene to render.

Accessors

  • get fullscreenMaterial(): Material
  • The fullscreen material.

    Returns Material

  • set fullscreenMaterial(arg): void
  • Parameters

    • arg: Material

    Returns void

  • get height(): number
  • The current height of the internal render targets.

    Returns number

    Deprecated

    Use resolution.height instead.

  • set height(arg): void
  • Sets the render height.

    Parameters

    • arg: number

    Returns void

    Deprecated

    Use resolution.preferredHeight instead.

  • set mainCamera(arg): void
  • Sets the main camera.

    Parameters

    • arg: Camera

    Returns void

  • set mainScene(arg): void
  • Sets the main scene.

    Parameters

    • arg: Scene

    Returns void

  • get renderToScreen(): boolean
  • Indicates whether this pass should render to screen.

    Returns boolean

  • set renderToScreen(arg): void
  • Sets the render to screen flag.

    If this flag is changed, the fullscreen material will be updated as well.

    Parameters

    • arg: boolean

    Returns void

  • get scale(): number
  • The current blur scale.

    Returns number

    Deprecated

    Use blurMaterial.scale instead.

  • set scale(arg): void
  • Parameters

    • arg: number

    Returns void

  • get width(): number
  • The current width of the internal render targets.

    Returns number

    Deprecated

    Use resolution.width instead.

  • set width(arg): void
  • Sets the render width.

    Parameters

    • arg: number

    Returns void

    Deprecated

    Use resolution.preferredWidth instead.

  • get AUTO_SIZE(): number
  • An auto sizing flag.

    Returns number

    Deprecated

    Use Resolution.AUTO_SIZE instead.

Methods

  • Performs a shallow search for disposable properties and deletes them.

    The EffectComposer calls this method when it is being destroyed. You can use it independently to free memory when you're certain that you don't need this pass anymore.

    Returns void

  • Returns the current depth texture.

    Returns Texture

    The current depth texture, or null if there is none.

  • Returns the current fullscreen material.

    Returns Material

    The current fullscreen material, or null if there is none.

    Deprecated

    Use fullscreenMaterial instead.

  • Returns the kernel size.

    Returns KernelSize

    The kernel size.

    Deprecated

    Use kernelSize instead.

  • Returns the resolution settings.

    Returns Resolution

    The resolution.

    Deprecated

    Use resolution instead.

  • Returns the current resolution scale.

    Returns number

    The resolution scale.

    Deprecated

    Use resolution instead.

  • Returns the current blur scale.

    Returns number

    The scale.

    Deprecated

    Use blurMaterial.scale instead.

  • Performs initialization tasks.

    This method is called when this pass is added to an EffectComposer.

    Parameters

    • renderer: WebGLRenderer

      The renderer.

    • alpha: boolean

      Whether the renderer uses the alpha channel or not.

    • frameBufferType: number

      The type of the main frame buffers.

    Returns void

  • Indicates whether this pass is enabled.

    Returns boolean

    Whether this pass is enabled.

    Deprecated

    Use enabled instead.

  • Blurs the input buffer and writes the result to the output buffer. The input buffer remains intact, unless it's also used as the output buffer.

    Parameters

    • renderer: WebGLRenderer

      The renderer.

    • inputBuffer: WebGLRenderTarget<Texture>

      A frame buffer that contains the result of the previous pass.

    • outputBuffer: WebGLRenderTarget<Texture>

      A frame buffer that serves as the output render target unless this pass renders to screen.

    • Optional deltaTime: number

      The time between the last frame and the current one in seconds.

    • Optional stencilTest: boolean

      Indicates whether a stencil mask is active.

    Returns void

  • Sets the depth texture.

    This method will be called automatically by the EffectComposer. You may override this method if your pass relies on the depth information of a preceding RenderPass.

    Parameters

    • depthTexture: Texture

      A depth texture.

    • Optional depthPacking: DepthPackingStrategies

      The depth packing.

    Returns void

  • Enables or disables this pass.

    Parameters

    • value: boolean

      Whether the pass should be enabled.

    Returns void

    Deprecated

    Use enabled instead.

  • Protected

    Sets the fullscreen material.

    Parameters

    • value: Material

      A fullscreen material.

    Returns void

    Deprecated

    Use fullscreenMaterial instead.

  • Sets the kernel size.

    Larger kernels require more processing power but scale well with larger render resolutions.

    Parameters

    Returns void

    Deprecated

    Use kernelSize instead.

  • Sets the renderer

    Parameters

    • renderer: WebGLRenderer

      The renderer.

    Returns void

    Deprecated

  • Sets the resolution scale.

    Parameters

    • scale: number

      The new resolution scale.

    Returns void

    Deprecated

    Use resolution instead.

  • Sets the blur scale.

    This value influences the overall blur strength and should not be greater than 1. For larger blurs please increase the kernel size via setKernelSize!

    Note that the blur strength is closely tied to the resolution. For a smooth transition from no blur to full blur, set the width or the height to a high enough value.

    Parameters

    • value: number

      The scale.

    Returns void

    Deprecated

    Use blurMaterial.scale instead.

  • Sets the size.

    You may override this method if you want to be informed about the size of the backbuffer/canvas. This method is called before initialize and every time the size of the EffectComposer changes.

    Parameters

    • width: number

      The width.

    • height: number

      The height.

    Returns void