EffectComposer Class

Module: Postprocessing

The effect composer is used to organize multiple post-processing passes.

It is used by camera objects to organize the rendering pipeline.

Methods

addPass

(
  • pass
)

Add new pass to the composer.

Parameters:

  • pass Pass

    Rendering pass to be added.

dispose

()

Dispose this effect composer.

fromJSON

(
  • json
)
EffectComposer static

Create a new effect composer loaded from json data.

Parameters:

  • json Object

    JSON data to load.

Returns:

EffectComposer:

Composer loaded from data.

insertPass

(
  • pass
  • index
)

Insert new pass into the composer in a specific position.

Parameters:

  • pass Pass

    Rendering pass to be added.

  • index Number

    Index to be inserted on.

moveBack

(
  • pass
)
Boolean

Move pass back in the list of render passes.

Moving back means that the pass is rendered earlier in the pipeline.

Parameters:

  • pass Pass

    Pass to be moved.

Returns:

Boolean:

Returns true on success, false otherwise.

moveForward

(
  • pass
)
Boolean

Move pass forward in the list of render passes.

Moving forward in the list means being renderer later down the pipeline.

Parameters:

  • pass Pass

    Pass to be moved.

Returns:

Boolean:

Returns true on success, false otherwise.

removePass

(
  • pass
)

Remove pass from this composer, if pass is not found nothing happens.

Parameters:

  • pass Pass

    Pass to be removed from the composer.

render

(
  • renderer
  • scene
  • delta
)

Render a scene using this effect composer and a renderer.

Parameters:

  • renderer WebGLRenderer

    Render to be used to render the scene.

  • scene Scene

    Scene to render.

  • delta Number

    Delta time.

reset

()

Reset this effect composer.

setSize

(
  • width
  • height
)

Set rendering size for the composer.

Also updates the size for all passes attached to the composer.

Parameters:

  • width Number

    Width.

  • height Number

    Height.

swapBuffers

()

Swap rendering buffers.

Used to make the output buffer of a render pass the input of the next one.

toJSON

()

Serialize this effect composer to JSON.

Properties

copyPass

ShaderPass

Copy shader used to copy data between the read and write buffer or to copy the writeBuffer to screen when necessary.

passes

Array

Passes attached to this effect composer.

The passes are rendered in order.

readBuffer

WebGLRenderTarget

Input buffer passed to the render pass.

rendererState

RendererState

Renderer state configuration, stored the clear configuration of the renderer.

Used to store and restore states.

writeBuffer

WebGLRenderTarget

Input buffer passed to the render pass.