s_cellLayerMask
global · terrain
- Address
0x8104b4· 16 bytes, up to0x8104c3- Type
uint16_t[8]- Meaning
- Holds 3 << 2 × column, the two-bit layer index of a cell's column in a row word
- Confidence
- verified, proof one
- Finding
- terrain/detail#detail-doodad-scatter
Finding: Detail doodad scatter in terrain: detail doodads
0x6bfc10 scatters the detail doodads of a chunk. It needs the chunk to have layers and every
model they name to be loaded (0x6bfb70); it makes the chunk's batch and seeds one random
stream with (chunk +0x90 << 16) | chunk +0x8c. Pass 1 draws the frillDensity cells, each two
draws (column, then row, each the stream's value & 7), repeats allowed, and builds the cell's four
ground planes once. Pass 2 takes the picks in order, skipping a pick whose cell has its no-effect
bit set, lies in a hole quad, or whose layer has no effect row, and places the row's Density
tufts (8 when it is 0).
The derivation is in the doc.