benilla-re systems structs docs

CCamera::SetTargetAlpha

function · uicamera · orchestration

Address
0x50f8f0 · 22 bytes, up to 0x50f905
Signature
void __thiscall (CCamera *this, uint32_t alpha)
Meaning
Passes the self fade alpha to the world frame
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.

Callers 2

Callees 1

Calls and jumps by a bare address, from tables/calls.tsv.