benilla-re systems structs docs

s_vertexFormats

global · terrain

Address
0x809c00 · 208 bytes, up to 0x809ccf
Type
uint32_t[52]
Meaning
Holds the 13 vertex formats: descriptor pointer, element count, stride and usage mask
Confidence
verified, proof one
Finding
terrain/render#vertex-formats

Finding: Vertex formats in terrain: render

The device takes a vertex format number: 0x58a7c0 binds a vertex buffer under one of the 13 formats of the table at 0x809c00. A record of 16 bytes holds the pointer to the element descriptors, the element count, the stride and the usage mask. Bit 0 of the mask is the position (12 bytes), bit 3 the normal (12), bit 4 the colour (4), bit 5 the first texture coordinate (8) and bit 6 the second (8); bits 1 and 2 are 4 bytes each and occur only in format 12. The table lists the formats the terrain code binds.

formatmaskstrideelementsused by
30x290x20position, normal, coordinateexterior group batches
40x390x24position, normal, colour, coordinateinterior group batches, exterior group water
50x690x28position, normal, two coordinatesterrain liquid
60x790x2cposition, normal, colour, two coordinatesfootprints
80x310x18position, colour, coordinateinterior group water, magma

The derivation is in the doc.