s_levelSpans
global · terrain
- Address
0x81122c· 32 bytes, up to0x81124b- Type
uint32_t[8]- Meaning
- Holds each level's row span 136, 68, 34, 17 and column span 8, 4, 2, 1 in flat vertices
- Confidence
- verified, proof one
- Finding
- terrain/lod#chunk-index-leaves
Finding: Chunk index leaves in terrain: lod
A leaf numbers the vertices flat in rows of 17. At level 3 the quad's corner is row × 17 + column, the
centre is the inner vertex 9 above it and the other corners are one and 17 on; at level 2 the cell centre is an
outer vertex and the corners are the centre ± 17 ± 1. It emits four fans (centre, from, to) in the
order column − 1 edge (caps byte 3), row + 1 (byte 2), column + 1 (byte 1) and row − 1 (byte 0); an edge whose
caps byte is above the level is split at its middle into (centre, from, middle) and (centre, middle, to).
The derivation is in the doc.