Renderer · interface
LightmapPage
One page as a consumer decoded it.
Explained in Hello world.
interface LightmapPageimport type { LightmapPage } from '@driftengine/core';Properties
| Name | Type | Description |
|---|---|---|
widthreadonly | number | |
heightreadonly | number | |
irradiancereadonly | Float32Array | Uint32Array | Linear irradiance, row-major from the top, in the same units every other light here is in — a
bake from another engine scaled by that engine's exposure, as its lights are. Either three
floats a texel, or one word a texel already packed as rgb9e5 (rgb9e5.ts), which is how such a
bake usually arrives and which uploads with no conversion at all. |
directionreadonly | Uint8Array | The direction the light arrives from, four bytes a texel: a first-order spherical harmonic in
this engine's world axes, each value stored as v * 0.5 + 0.5 — xyz the axis, w the constant. |