Skip to content

BakeSurface

Defined in: sdk/src/lightmap/atlas.ts:16

One object to bake: geometry with a lightmap UV set, and where it stands.

optional albedo?: readonly [number, number, number]

Defined in: sdk/src/lightmap/atlas.ts:22

What fraction of each channel the surface reflects. Drives the bounce; a surface that reflects nothing still receives light.


optional coverage?: number

Defined in: sdk/src/lightmap/atlas.ts:32

Share of its area that is there — for a cutout, the texels past its cutoff. Rays pass the rest, so foliage shades what is under it without walling it in.


optional label?: string

Defined in: sdk/src/lightmap/atlas.ts:24

What to call it when a bake has something to say about it.


mesh: MeshData

Defined in: sdk/src/lightmap/atlas.ts:17


optional realtimeDirect?: boolean

Defined in: sdk/src/lightmap/atlas.ts:27

True when its draw adds the lamps itself (a lit renderer): its patch then holds only what arrives indirectly, or the lamps would land twice.


transform: ArrayLike<number>

Defined in: sdk/src/lightmap/atlas.ts:19

Column-major 4x4, as glm and the engine write one.


optional twoSided?: boolean

Defined in: sdk/src/lightmap/atlas.ts:29

Drawn with both faces: a ray arriving at its back finds it lit, not black.