BuildLiquidLodMesh
function · terrain · primitive
- Address
0x68a400· 812 bytes, up to0x68a72b- Signature
void __thiscall (void *this, uint32_t arg2)- Meaning
- Builds a liquid mesh template of n: the serpentine vertices, the index list and, for n of 1, 3, 7 and 15, a strip
- Confidence
- verified, proof one
- Finding
- terrain/liquid#liquid-mesh-templates
- Test
terrain::liquid_lod_mesh_difftest
Finding: Liquid mesh templates in terrain: liquid
The first area constructed makes five liquid mesh templates once (0x68a750, from 0x6c1d77), 0x44 bytes each, for
n = 0, 1, 3, 7 and 15 (the table at 0x86a040). A template of n has (n + 2)² vertices on a grid of n + 1 cells
a side. A vertex has a texture coordinate u/(n + 1), v/(n + 1) and a position of −4.1666665 times it. Rows run
alternately up and down from u = 0, so the vertex list is a serpentine. The 16-bit index list holds
(n + 1)(n + 2)·2 + 2 entries. Nothing in the image reads the templates after they are made.
The derivation is in the doc.
Callers 1
- InitLiquidLodMeshes terrain
Callees 5
- BuildLiquidStripIndices terrain
- FreeArrayB terrain
- GrowWordArray terrain
- GrowArrayA terrain
- GrowArrayB terrain
Calls and jumps by a bare address, from tables/calls.tsv.