Object3DLight

LightProbe

Light probes are an alternative way of adding light to a 3D scene. Unlike classical light sources (e.g. directional, point or spot lights), light probes do not emit light. Instead they store information about light passing through 3D space. During rendering, the light that hits a 3D object is approximated by using the data from the light probe.

Light probes are usually created from (radiance) environment maps. The class LightProbeGenerator can be used to create light probes from instances of CubeTexture or WebGLCubeRenderTarget. However, light estimation data could also be provided in other forms e.g. by WebXR. This enables the rendering of augmented reality content that reacts to real world lighting.

The current probe implementation in Verge3D supports so-called diffuse light probes. This type of light probe is functionally equivalent to an irradiance environment map.

Constructor

LightProbe(sh : SphericalHarmonics3, intensity : Float)

sh — (optional) An instance of SphericalHarmonics3.
intensity — (optional) Numeric value of the light probe's intensity. Default is 1.

Creates a new LightProbe.

Properties

See the base Light class for common properties. The color property is currently not evaluated and thus has no effect.

.isLightProbe : Boolean

Read-only flag to check if a given object is of type LightProbe.

.sh : SphericalHarmonics3

A light probe uses spherical harmonics to encode lighting information.

Methods

See the base Light class for common methods.

Source

For more info on how to obtain the source code of this module see this page.