s_vertexFormats
global · terrain
- Address
0x809c00· 208 bytes, up to0x809ccf- 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.
| format | mask | stride | elements | used by |
|---|---|---|---|---|
| 3 | 0x29 | 0x20 | position, normal, coordinate | exterior group batches |
| 4 | 0x39 | 0x24 | position, normal, colour, coordinate | interior group batches, exterior group water |
| 5 | 0x69 | 0x28 | position, normal, two coordinates | terrain liquid |
| 6 | 0x79 | 0x2c | position, normal, colour, two coordinates | footprints |
| 8 | 0x31 | 0x18 | position, colour, coordinate | interior group water, magma |
The derivation is in the doc.