Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PrePassRenderer

Renders a pre pass of the scene This means every mesh in the scene will be rendered to a render target texture And then this texture will be composited to the rendering canvas with post processes It is necessary for effects like subsurface scattering or deferred shading

Hierarchy

  • PrePassRenderer

Index

Constructors

constructor

  • Instanciates a prepass renderer

    Parameters

    Returns PrePassRenderer

Properties

disableGammaTransformSearch playground for disableGammaTransform

disableGammaTransform: boolean

Set to true to disable gamma transform in PrePass. Can be useful in case you already proceed to gamma transform on a material level and your post processes don't need to be in linear color space.

excludedMaterialsSearch playground for excludedMaterials

excludedMaterials: Material[]

Force material to be excluded from the prepass Can be useful when useGeometryBufferFallback is set to true and you don't want a material to show in the effect.

excludedSkinnedMeshSearch playground for excludedSkinnedMesh

excludedSkinnedMesh: AbstractMesh[]

To save performance, we can excluded skinned meshes from the prepass

imageProcessingPostProcessSearch playground for imageProcessingPostProcess

imageProcessingPostProcess: ImageProcessingPostProcess

Image processing post process for composition

mrtCountSearch playground for mrtCount

mrtCount: number

Number of textures in the multi render target texture where the scene is directly rendered

prePassRTSearch playground for prePassRT

The render target where the scene is directly rendered

Accessors

enabled

  • get enabled(): boolean
  • Indicates if the prepass is enabled

    Returns boolean

isSupported

  • get isSupported(): boolean
  • Indicates if rendering a prepass is supported

    Returns boolean

samples

  • get samples(): number
  • set samples(n: number): any
  • How many samples are used for MSAA of the scene render target

    Returns number

  • How many samples are used for MSAA of the scene render target

    Parameters

    • n: number

    Returns any

useGeometryBufferFallback

  • get useGeometryBufferFallback(): boolean
  • set useGeometryBufferFallback(value: boolean): any
  • Uses the geometry buffer renderer as a fallback for non prepass capable effects

    Returns boolean

  • Uses the geometry buffer renderer as a fallback for non prepass capable effects

    Parameters

    • value: boolean

    Returns any

Methods

addEffectConfigurationSearch playground for addEffectConfiguration

  • Adds an effect configuration to the prepass. If an effect has already been added, it won't add it twice and will return the configuration already present.

    Parameters

    Returns PrePassEffectConfiguration

    the effect configuration now used by the prepass

bindAttachmentsForEffectSearch playground for bindAttachmentsForEffect

  • bindAttachmentsForEffect(effect: Effect, subMesh: SubMesh): void
  • Sets the proper output textures to draw in the engine.

    Parameters

    • effect: Effect

      The effect that is drawn. It can be or not be compatible with drawing to several output textures.

    • subMesh: SubMesh

      Submesh on which the effect is applied

    Returns void

clearSearch playground for clear

  • clear(): void
  • Clears the scene render target (in the sense of settings pixels to the scene clear color value)

    Returns void

disposeSearch playground for dispose

  • dispose(): void
  • Disposes the prepass renderer.

    Returns void

getIndexSearch playground for getIndex

  • getIndex(type: number): number
  • Returns the index of a texture in the multi render target texture array.

    Parameters

    • type: number

      Texture type

    Returns number

    The index

markAsDirtySearch playground for markAsDirty

  • markAsDirty(): void
  • Marks the prepass renderer as dirty, triggering a check if the prepass is necessary for the next rendering.

    Returns void

restoreAttachmentsSearch playground for restoreAttachments

  • restoreAttachments(): void
  • Restores attachments for single texture draw.

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method