Pass Class

Module: Postprocessing

A render Pass is used to render something in the graphics pipeline.

Can be used to render a scene, apply post processing effects, merge buffers, etc.

Methods

createQuadScene

()

Create a quad scene to render post-processing effects.

It creates multiple attributes in the object to support that scene.

dispose

()

Dispose this render pass.

render

(
  • renderer
  • writeBuffer
  • readBuffer
  • delta
  • maskActive
  • scene
)

Render the scene using this render pass.

Parameters:

  • renderer WebGLRenderer
  • writeBuffer WebGLRenderTarget

    Buffer to write output.

  • readBuffer WebGLRenderTarget

    Input buffer.

  • delta Number

    Delta time in milliseconds.

  • maskActive Boolean

    Not used in this pass.

  • scene Scene

    Scene to render.

setSize

(
  • width
  • height
)

Set resolution of this render pass.

Parameters:

  • width Number
  • height Number

toJSON

(
  • meta
)

Serialize pass to json.

Parameters:

  • meta Object

    Metadata object.

Properties

clear

Boolean

If set to true, the pass clears its buffer before rendering.

copyToScreen

Boolean

If set to true, the result of the pass needs to be copied to the ouput by the effect renderer if renderToScren is enabled.

enabled

Boolean

If set to true, the pass is processed by the composer.

needsSwap

Boolean

If set to true, the pass indicates to swap read and write buffer after rendering.

renderToScreen

Boolean

If set to true, the result of the pass is rendered to screen.

Attributes

camera

THREE.OthographicCamera

Quad rendering camera.

quad

THREE.Mesh

Quad mesh, composed of a 2 by 2 plane geometry.

RGBALinear

Object static

Parameters used for a RGBA linear filtered render target.

RGBANearest

Object static

Parameters used for a RGBA unfiltered render target.

RGBLinear

Object static

Parameters used for a RGB linear filtered render target.

scene

THREE.Scene

Quad scene, that contains a single quad children.