benilla-re systems structs docs

ConstructWaveMapPass

function · ffxeffects · orchestration

Address
0x6cbcf0 · 261 bytes, up to 0x6cbdf4
Meaning
Builds the wave map base pass and creates the shared 128 by 128 wave map on the first use
Confidence
verified, proof one
Finding
ffxeffects/passes#wave-map-table

Finding: Wave map table in ffxeffects: the passes

0x6cbea0 is the data callback of the 128 by 128 wave map 0xce89a0, created by the pass base 0x6cbcf0 when the first such pass is built (a count in 0xce8998). With ecx 0 it allocates texels·16384 bytes and fills them; with 1 it stores the pitch and the address; with 2 it frees the buffer. For format 8 a texel is two signed bytes, low trunc(clamp(128·sin(2πx/128), −128, 127)) and high the same of y. For format 1 a texel is the dword (cx << 16) | (cy << 8) with c = trunc(clamp((sin·0.5 + 0.5)·255, 0, 255)) of x and y. The format is 1 when caps+0x98 is 0xa, 3 or 4, else 8.

The derivation is in the doc.

Callers 1

Callees 4

Calls and jumps by a bare address, from tables/calls.tsv.