benilla-re systems structs docs

s_cameraFadeThreshold

global · uicamera

Address
0x808abc · 4 bytes, up to 0x808abf
Type
const float
Meaning
Holds 1/360, which the camera fade compares with before its smoothstep
Confidence
verified, proof one
Finding
uicamera/driver#the-self-fade

Finding: The self fade in uicamera: the follow camera

The player's own model fades as the camera comes close and is hidden at first person. With D the orbit distance minus the near clip offset (+0x38) and F a threshold of 1.8315 yards, the alpha is 255 for D at or above F, 0 for D at or below 1/360, and in between 255 * (1 - cos(π D / F)) / 2 truncated. When the distance is below the pivot height and the pitch is below -68 degrees, F becomes 1.8315 / s^2 with s = (-π/2 - pitch) / (-π/2 + 68°), so the model stays faded farther out when the camera is below the character.

The derivation is in the doc.