Terrain · interface

ClipmapFrame

Everything a per-patch decision needs, computed once for a camera.

Explained in Terrain.

interface ClipmapFrame
import type { ClipmapFrame } from '@driftengine/terrain';

In depth

Deliberately plain data: an Int32Array of origins and four numbers. What a compute pass would be handed as a uniform block, and nothing a shader could not hold.

Properties

NameTypeDescription
levelsreadonlynumber
patchCellsreadonlynumber
patchesAcrossreadonlynumber
originsreadonlyInt32ArrayTwo entries a level: the field-cell index of the block's first cell, x then z.
fieldCellsXreadonlynumberCells the field has, which is one fewer than its samples.
fieldCellsZreadonlynumber