CullLowDetailTiles
function · terrain · orchestration
- Address
0x683040· 753 bytes, up to0x683330- Signature
void __fastcall (uint32_t arg1)- Meaning
- Queues the low-detail tiles around the camera that pass a frustum of their own and the horizon
- Confidence
- verified, proof one
- Finding
- terrain/lod#low-detail-tile-walk
- Test
terrain::scenewalk_arealow_far_project_difftest,terrain::scenewalk_camera_negate_difftest
Finding: Low-detail tile walk in terrain: lod
The scene lists the WDL tiles around the camera for each portal window or the outdoor rectangle.
0x683040 takes the tile rectangle of the loaded window (0xc63274 to 0xc63280 shifted right 4), grows it by
3 tiles each way and clamps to 0 to 63. It builds a frustum of its own and narrows it with the walk's
rectangle. Each tile pointer in the 64 by 64 table 0xc92078 that is not null, not already linked, and not
outside the frustum or the horizon becomes a draw candidate.
The derivation is in the doc.
Callers 1
- WalkScene terrain
Callees 11
- GetActiveCamera ui
- GetDeviceView gx
- BuildPerspectiveMatrix gxumath
- BuildFrustumCorners gxumath
- PushFrustum terrain
- BuildPortalVolume terrain
- IsBoxCulled terrain
- PopFrustum terrain
- TestHorizonBox terrain
- UnlinkLinkF terrain
- TranslateMatrix cmath
Calls and jumps by a bare address, from tables/calls.tsv.