Renderer · interface

LightmapPage

One page as a consumer decoded it.

Explained in Hello world.

interface LightmapPage
import type { LightmapPage } from '@driftengine/core';

Properties

NameTypeDescription
widthreadonlynumber
heightreadonlynumber
irradiancereadonlyFloat32Array | Uint32ArrayLinear 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.
directionreadonlyUint8ArrayThe 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.