Terrain · function

clipmapPatchAt

Decide one patch, by index, writing it into out.

Explained in Terrain.

function clipmapPatchAt(frame: ClipmapFrame, index: number, out: ClipmapPatch): boolean
import { clipmapPatchAt } from '@driftengine/terrain';

Parameters

ParameterTypeDescription
frameClipmapFrame
indexnumber
outClipmapPatch

In depth

Returns whether it is drawn. Reads the frame and the index and nothing else, which is what makes this the body of a compute shader rather than a loop that has to be rewritten as one.