DriftCapture · function
promptGrid
A lattice of prompt points over an image, seeded.
Explained in DriftCapture.
function promptGrid(width: number, height: number, across: number, down: number, random: () => number): Float32Arrayimport { promptGrid } from '@driftengine/capture';Parameters
| Parameter | Type | Description |
|---|---|---|
width | number | |
height | number | |
across | number | |
down | number | |
random | () => number |
In depth
A lattice rather than a scatter, because a scatter leaves gaps a small object falls into and
a lattice does not; the seeded jitter is there so that a repeated object does not land on the
same part of every instance, which is how a grid misses the same feature twice. Two per pixel
pair — x then y — in reading order, which is the order a model's masks come back in.