benilla-re systems structs docs

s_glFogMode

global · gx

Address
0x85c358 · 12 bytes, up to 0x85c363
Type
uint32_t[3]
Meaning
Holds the OpenGL fog mode of each fog mode id: linear, exp, exp2
Confidence
verified, proof one
Finding
gx/renderstate#cull-fog-and-masks

Finding: Cull, fog and masks in gx: render state

Id 20 with its capability bit set and a non-zero value culls; Direct3D sets CULLMODE to D3DCULL_CW (2) for it and D3DCULL_NONE (1) otherwise (0x80a2a8); OpenGL toggles GL_CULL_FACE (0xb44). The face to cull is the separate OpenGL state 0x4e, glCullFace, set by other code. Id 9 picks the fog mode from 0x80a28c (3, 1, 2: linear, exp, exp2) or 0x85c358 (GL_LINEAR, GL_EXP, GL_EXP2); ids 10 to 13 are start, end, density and colour. The colour mask of id 19 is passed whole to COLORWRITEENABLE (0xa8) or split into four glColorMask booleans.

The derivation is in the doc.