benilla-re systems structs docs

s_shPackWeights

global · models

Address
0x8120a8 · 32 bytes, up to 0x8120c7
Type
const float[8]
Meaning
Holds the irradiance weights that pack the harmonic terms into seven constant vectors
Confidence
verified, proof one
Finding
models/lights#harmonic-constants

Finding: Harmonic constants in models: lights

The terms become seven vectors at +0xf0, built once per record (flag 4) and copied out. For each channel with terms L:

vectorxyzw
A (0–2)−0.325735·L3−0.325735·L10.325735·L20.2820948·L0 − 0.0788479·L6
B (3–5)0.2731371·L4−0.2731371·L50.2365437·L6−0.2731371·L7
C (6)0.1365686·L8 redgreenblue1.0

M2DrawSetLighting puts them in vertex constants c10–c16 or pixel constants c1–c7 (render#lighting-lanes).

The derivation is in the doc.