Skip to content

Documentation / scene / LightingMode

Type Alias: LightingMode

LightingMode = "legacy" | "physical"

Defined in: libs/scene/src/utility/physical.ts:33

Scene lighting unit model.

Remarks

legacy keeps the original unitless model: light intensity is an arbitrary multiplier and tonemapping applies a plain toneMapExposure. It is a public, widely used API and its behaviour is frozen.

physical uses photometric units throughout, following Filament's conventions:

QuantityUnitProperty
Directional lightlux (lm/m²)DirectionalLight.illuminance
Point lightlumen (authored) / candela (shaded)luminousPower / luminousIntensity
Spot lightlumen (authored) / candela (shaded)luminousPower / luminousIntensity
Rect lightcd/m² (nit)RectLight.luminance
Environment / IBLcd/m² (nit)EnvLightWrapper.intensity
Emissive materialcd/m² (nit) at emissiveExposureWeight 1emissiveLuminance (legacy: emissiveStrength)
Camera exposureunitless multiplierCamera.exposure

Lighting is pre-exposed on the CPU: every light quantity is multiplied by the camera exposure before upload, so the HDR render target stays near 1.0 and downstream passes (bloom, SSR, SSGI, fog) need no unit awareness. Tonemapping therefore applies the ACES curve only.

Emissive is the one exception, because it is authored on a material rather than a light. It is exposed in the shader, and emissiveExposureWeight decides whether it is exposed at all: at 1 it is a true cd/m² luminance, at 0 the exposure cancels out and emissiveLuminance degrades to a display-referred multiplier. Imported glTF/FBX materials use 0 to preserve glTF's display-referred emissive, so their emissiveLuminance does not read in nits.

Released under the MIT License.