s_gammaRampScale
global · gx
- Address
0x809d98· 4 bytes, up to0x809d9b- Type
float- Meaning
- Holds 65535.0, the scale of a gamma ramp entry
- Confidence
- verified, proof one
- Finding
- gx/device#gamma-ramp
Finding: Gamma ramp in gx: the device
0x591680(ramp, g) fills three 256-entry tables of 16-bit values at ramp +0, +0x200 and +0x400: entry i is __ftol(pow(i * (1/255), g) * 65535) in each. The constructor builds the two device ramps for g = 1.0 (+0x328 and +0x928). The device slot +0x34 builds the working ramp +0x328 from a gamma value, slot +0x30 copies in a whole ramp, and the Direct3D versions then call IDirect3DDevice9::SetGammaRamp(0, 0, ramp) only when [dev+0x38b8] & 0x20000 is set and the device is not windowed ([dev+0x20b] clear).
The derivation is in the doc.