InitLiquidRamps
function · terrain · primitive
- Address
0x68c4c0· 599 bytes, up to0x68c716- Signature
void __cdecl (void)- Meaning
- Makes the wave pool, the depth ramps A and B, the alpha table, the ramp textures and the ocean shader
- Confidence
- verified, proof one
- Finding
- terrain/liquid#depth-ramps
- Test
terrain::depth_ramps_difftest,terrain::glare_table_difftest,terrain::geom_rate_difftest
Finding: Depth ramps in terrain: liquid
At start-up 0x68c4c0 builds the tables the vertex fills read. With c = 0.58333331, for i from
0 to 255, B[i] = min(1, (c·i)·(1/(c·255))) and A[i] = (i·(1/9))·0.21428572, or 1.0 when
i·(1/9) is above 4.6666665, B at 0xc7fcd8 and A at 0xc81768; every value is a float of a
53-bit computation. It also fills 64 alpha
bytes, floor of 255·min(1, 1.6·(i/63)⁸), into the top byte of 0xc7fbc0's dwords, makes three
liquid textures and loads the shader ocean0_s.
The derivation is in the doc.
Callers 1
- CMap::Initialize terrain
Callees 8
- SplatVector3 loadingscreen
- __ftol crt
- CGxTexFlags::CGxTexFlags gx
- GxTexCreate2D gx
- 0x58b2b0 gx
- SMemAlloc storm
- InitRipples terrain
- ReserveArrayA terrain
Calls and jumps by a bare address, from tables/calls.tsv.