GeometryBufferRenderer

This renderer is helpfull to fill one of the render target with a geometry buffer.

Hierarchy

  • GeometryBufferRenderer

Index

Constructors

constructor

  • Creates a new G Buffer for the scene

    Parameters

    • scene: Scene

      The scene the buffer belongs to

    • Optional ratio: number

      How big is the buffer related to the main canvas.

    Returns GeometryBufferRenderer

Properties

enablePosition

enablePosition: boolean

Sets wether or not position are enabled for the G buffer.

isSupported

isSupported: boolean

Gets wether or not G buffer are supported by the running hardware. This requires draw buffer supports

ratio

ratio: number

Gets the ratio used by the buffer during its creation. How big is the buffer related to the main canvas.

renderList

renderList: Mesh[]

Set the render list (meshes to be rendered) used in the G buffer.

samples

samples: number

Sets the number of samples used to render the buffer (anti aliasing).

scene

scene: Scene

Gets the scene associated with the buffer.

Methods

dispose

  • dispose(): void
  • Disposes the renderer and frees up associated resources.

    Returns void

getGBuffer

isReady

  • isReady(subMesh: SubMesh, useInstances: boolean): boolean
  • Checks wether everything is ready to render a submesh to the G buffer.

    Parameters

    • subMesh: SubMesh

      the submesh to check readiness for

    • useInstances: boolean

      is the mesh drawn using instance or not

    Returns boolean

    true if ready otherwise false

Generated using TypeDoc