Class Pass

The base class to extend for further passes in MapView, like the MSAARenderPass,

Remarks

Pass provides the core logic for both :

  • render passes (proper scene renders),
  • and shader passes (quad renders, i.e. effects added on top of the render output as a postprocess).

Even some shader passes still actually fall within the render pass category as they need to re-render the scene to then deduce an effect, such as masking, AO, DoF etc. Others just need the previous input image to apply a shader on top of it, as for bloom or NVIDIA's FXAA for example. These only are proper shader passes.

Hierarchy

Implements

Constructors

Properties

Methods

Constructors

Properties

enabled: boolean = false

Whether the Pass instance is active or not.

Default

true.

renderToScreen: boolean = false

Whether the render method should target a WebGLRenderTarget instance, or the frame buffer.

Default

false.

Methods

  • The render method to extend in Pass implementations.

    Parameters

    • renderer: WebGLRenderer

      The WebGLRenderer instance in use.

    • scene: Scene

      The scene to render.

    • camera: Camera

      The camera to render the scene through.

    • writeBuffer: null | WebGLRenderTarget

      The optional WebGLRenderTarget instance to write to.

    • readBuffer: null | WebGLRenderTarget

      The optional WebGLRenderTarget instance of a previous pass to write onto.

    • Optional delta: number

      The time argument from the requestAnimationFrame.

    Returns void

    Remarks

    This is the place where the desired effects or render operations are executed.

  • The resize method to extend in Pass implementations.

    Parameters

    • width: number

      Width to resize to.

    • height: number

      Height to resize to.

    Returns void

    Remarks

    It resizes the render targets. Call on resize events.

Generated using TypeDoc