s_m2TextureCenterGuard
global · models
- Address
0xcf04c4· 1 bytes, up to0xcf04c4- Type
uint8_t- Meaning
- Holds bit 1 once the texture transform centre is built
- Confidence
- verified, proof one
- Finding
- models/animation#texture-transforms
Finding: Texture transforms in models: animation
Each frame each texture transform builds its matrix from identity: when its rotation track has keys,
translate by the centre p = (0.5, 0.5, 0), rotate by the sampled quaternion, translate by −p;
then the same with the sampled scale; then translate by the sampled translation. Each step
multiplies on the left, so for the row vector (u, v, 0, 1) the result is ((uv + t − p) ⊙ s)·Q + p, Q the quaternion's matrix with rows (1 − 2(y² + z²), 2xy + 2zw, 2xz − 2yw), (2xy − 2zw, 1 − 2(x² + z²), 2yz + 2xw) and (2xz + 2yw, 2yz − 2xw, 1 − 2(x² + y²)). The tracks sample at bone 0's
time.
The derivation is in the doc.