SnapDecalPoint
function · gxumath · unreached
- Address
0x5c63d0· 154 bytes, up to0x5c6469- Signature
void __fastcall (const uint32_t *caps, const float *in, float *out)- Meaning
- Writes a point rounded by the decal grid function when the capability words select it
- Confidence
- verified, proof one
- Finding
- gxumath#decal-grid-rounding
Finding: Decal grid rounding in gxumath
0x5c63d0 (ecx a capability record, edx an (x, y) pair, the output on the stack, ret 4)
writes (g(x), g(y), 1) for g(v) = ceil(floor(16v + 0.5)/16) when the dword at +8 of the record
is nonzero, using 0x5c6470 if the dword at +4 is 0 and 0x5c64b0 if not; the two are the same
code. With +8 zero it writes nothing. The result is a whole number: the 53-bit product 16v
plus the double 0.5 is floored, scaled by 1/16 and ceiled.
The derivation is in the doc.
Callers 1
- BuildDecalTexCoords gxumath
Callees 2
- RoundToGridCeil gxumath
- RoundToGridCeilAlt gxumath
Calls and jumps by a bare address, from tables/calls.tsv.