Class EffectPass

An effect pass.

Use this pass to combine Effect instances.

Hierarchy (view full)

Constructors

  • Constructs a new effect pass.

    Parameters

    • Optional camera: Camera

      The main camera.

    • Rest ...effects: Effect[]

      The effects that will be rendered by this pass.

    Returns EffectPass

Properties

camera: Camera

The camera.

effects: Effect[]

The effects.

Use updateMaterial or recompile after changing the effects and consider calling dispose to free resources of unused effects.

enabled: boolean

Indicates whether this pass is enabled.

maxTime: number

The maximum time.

If the elapsed time exceeds this value, it will be reset.

Deprecated

minTime: number

A time offset.

Elapsed time will start at this value.

Deprecated

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

scene: Scene

The scene to render.

Accessors

  • get dithering(): boolean
  • Indicates whether dithering is enabled.

    Returns boolean

  • set dithering(arg): void
  • Parameters

    • arg: boolean

    Returns void

  • get encodeOutput(): boolean
  • Indicates whether this pass encodes its output when rendering to screen.

    Returns boolean

    Deprecated

    Use fullscreenMaterial.encodeOutput instead.

  • set encodeOutput(arg): void
  • Parameters

    • arg: boolean

    Returns void

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

    Returns Material

  • set fullscreenMaterial(arg): void
  • Parameters

    • arg: Material

    Returns void

  • 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

Methods

  • Deletes disposable objects. This pass will be inoperative after this method was called!

    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.

  • Handles events.

    Parameters

    • event: Event

      An event.

    Returns void

  • Performs initialization tasks.

    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.

  • Rebuilds the shader material.

    Returns void

  • Renders the effect.

    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.

    Parameters

    • depthTexture: Texture

      A depth texture.

    • Optional depthPacking: number

      The depth packing.

    Returns void

  • Sets the effects.

    Parameters

    • effects: Effect[]

      The effects.

    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 renderer

    Parameters

    • renderer: WebGLRenderer

      The renderer.

    Returns void

    Deprecated

  • Updates the size of this pass.

    Parameters

    • width: number

      The width.

    • height: number

      The height.

    Returns void

  • Updates the compound shader material.

    Returns void