s_boxCornerAxes
global · terrain
- Address
0x868628· 96 bytes, up to0x868687- Type
uint32_t[24]- Meaning
- Holds which bound, min or max, each of a box's eight corners takes per axis
- Confidence
- verified, proof one
- Finding
- terrain/cull#horizon-box-test
Finding: Horizon box test in terrain: cull
0x686180(box, flags) returns 2 when the box is hidden behind the horizon and 0 otherwise. Its
eight corners go through the view matrix; unless flags bit 3 is set, a corner with z below 50
makes the box visible. The box spans the columns from round(64·min x/z − 0.5) + 160 to
round(64·max x/z − 0.5) + 161, one more than the occluders' rule, and is hidden when every
column in that span, clamped, is at least its highest y/z.
The derivation is in the doc.