API

Class ReflectiveShadowMap

Class used to generate the RSM (Reflective Shadow Map) textures for a given light. The textures are: position (in world space), normal (in world space) and flux (light intensity)

Index
  • Creates a new RSM for the given light.

    Parameters

    • scene: Scene

      The scene

    • light: any

      The light to use to generate the RSM textures

    • textureDimensions: { height: number; width: number } = ...

      The dimensions of the textures to generate. Default: { width: 512, height: 512 }

    Returns ReflectiveShadowMap

forceUpdateLightParameters: boolean = false

Gets or sets a boolean indicating if the light parameters should be recomputed even if the light parameters (position, direction) did not change. You should not set this value to true, except for debugging purpose (if you want to see changes from the inspector, for eg). Instead, you should call updateLightParameters() explicitely at the right time (once the light parameters changed).

  • Adds the given mesh to the render list used to generate the RSM textures.

    Parameters

    • Optionalmesh: any

      The mesh to add to the render list used to generate the RSM textures. If not provided, all scene meshes will be added to the render list.

    Returns void

  • Recomputes the light transformation matrix. Call this method if you manually changed the light position / direction / etc. and you want to update the RSM textures accordingly. You should also call this method if you add/remove meshes to/from the render list.

    Returns void