s_oneNinth
global · terrain
- Address
0x81028c· 4 bytes, up to0x81028f- Type
float- Meaning
- Holds 1/9 as the float 0x3de38e39
- Confidence
- verified, proof one
- Finding
- terrain/liquid#depth-ramps
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.