ReflectionProbe

Class used to generate realtime reflection / refraction cube textures

see

http://doc.babylonjs.com/how_to/how_to_use_reflection_probes

Hierarchy

  • ReflectionProbe

Index

Constructors

constructor

Find examples in Playground
  • new ReflectionProbe(name: string, size: number, scene: Scene, generateMipMaps?: boolean, useFloat?: boolean): ReflectionProbe
  • Creates a new reflection probe

    Parameters

    • name: string

      defines the name of the probe

    • size: number

      defines the texture resolution (for each face)

    • scene: Scene

      defines the hosting scene

    • Optional generateMipMaps: boolean

      defines if mip maps should be generated automatically (true by default)

    • Optional useFloat: boolean

      defines if HDR data (flaot data) should be used to store colors (false by default)

    Returns ReflectionProbe

Properties

cubeTexture

Find examples in Playground
cubeTexture: RenderTargetTexture

Gets the internal CubeTexture used to render to

name

Find examples in Playground
name: string

defines the name of the probe

position

Find examples in Playground
position: Vector3

Gets or sets probe position (center of the cube map)

refreshRate

Find examples in Playground
refreshRate: number

Gets or sets the refresh rate to use (on every frame by default)

renderList

Find examples in Playground
renderList: Nullable<AbstractMesh[]>

Gets the list of meshes to render

samples

Find examples in Playground
samples: number

Gets or sets the number of samples to use for multi-sampling (0 by default). Required WebGL2

Methods

attachToMesh

Find examples in Playground
  • Attach the probe to a specific mesh (Rendering will be done from attached mesh's position)

    Parameters

    Returns void

dispose

Find examples in Playground
  • dispose(): void
  • Clean all associated resources

    Returns void

getScene

Find examples in Playground
  • Gets the hosting scene

    Returns Scene

    a Scene

setRenderingAutoClearDepthStencil

Find examples in Playground
  • setRenderingAutoClearDepthStencil(renderingGroupId: number, autoClearDepthStencil: boolean): void
  • Specifies whether or not the stencil and depth buffer are cleared between two rendering groups

    Parameters

    • renderingGroupId: number

      The rendering group id corresponding to its index

    • autoClearDepthStencil: boolean

      Automatically clears depth and stencil between groups if true.

    Returns void

Generated using TypeDoc