Skip to content

Documentation / @ripl/3d / resolveLight

Function: resolveLight() ​

resolveLight(light): ResolvedLight

Defined in: 3d/src/core/lights.ts:425

Flattens a light into the numeric form shadeSurface and the scene uniform consume.

The result is a fresh object the caller owns, so a camera-space light can be carried into world space without mutating the light itself.

Parameters ​

ParameterTypeDescription
lightLightThe light to resolve.

Returns ​

ResolvedLight

The resolved light, with its colour premultiplied by intensity.