feat(render): S2 chunk 2 - render statics borrow the registry's retail cell array

WalkProductionWorldData no longer floods; its indoor and outdoor static
sweeps read ShadowObjectRegistry.TryGetRetailCellArray (retail's
calc_cross_cells_static @0x00515160 -> AddPartsShadow @0x00517e40
CELLARRAY, computed once at registration). The App-owned render flood
(ResolveStaticRenderCells, its fingerprint cache, the primitive-Setup
special case) and Core's ComputeStaticRenderCells are deleted. The one
remaining fallback, an entity the physics publisher has not registered yet
while the projection journal already published it, buckets to the authored
parent cell and is counted per frame (UnregisteredStaticRenderFallbackCount)
for chunk 5 to judge on the connected route.

The Facility stair pin now registers at the projection's own entity id
(the old pure-function test never carried identity) and reads the retail
array; the installed-DAT comparator compares retail against collision.

Gates (run in the implementer's isolated worktree at identical content):
Release build 0/0; Core Physics 2,202/2,202; App hermetic 6,760/6,760 (the
two added WalkProductionWorldData tests); installed-DAT walk/flood/stair
family 24/24; Runtime 1,884/1,884.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-09-02 22:31:46 +02:00
parent 2b40c0bb38
commit 707d2803a4
10 changed files with 392 additions and 227 deletions

View file

@ -176,21 +176,33 @@ Likewise `PView::DrawCells` calls `DrawEnvCell` once per admitted cell and
draws its complete constructed shell. Portal polygons are not GPU mesh clips;
pixel occlusion comes from the ordered walk and depth buffer.
**Retail static render-shadow cell membership (2026-08-31).** Indoor
statics are not rendered solely from their authored parent EnvCell. Retail's
**Retail static render-shadow cell membership (2026-08-31; ownership moved
to `ShadowObjectRegistry` by Campaign OVERHAUL S2 chunk 2).** Indoor statics
are not rendered solely from their authored parent EnvCell. Retail's
`CEnvCell::init_static_objects` creates a `CPhysicsObj` for every static,
then `calc_cross_cells_static` + `CPartArray::AddPartsShadow` places every
visual part in each crossed cell's `shadow_part_list`, including decorative
GfxObjs that have no collision BSP. `WalkProductionWorldData` therefore owns
a distinct render-only per-cell index built from each MeshRef's prepared
visual AABB and the existing exact static part transit walk. This must not be
collapsed into `ShadowObjectRegistry`'s collision rows: the two retail lists
share transit math but have different membership. A primitive-only Setup may
reuse its already-authored cylsphere collision cell set; BSP-bearing and
pure-visual statics use the all-visual-part box walk. The Facility Hub stair
Setup `0x02000623` is the installed-DAT regression: its authored parent is
`0x8A02015F`, while its visual parts also register in `0x8A02015E` and the
adjoining vertical cells.
GfxObjs that have no collision BSP. `ShadowObjectRegistry` owns this product
as a retained per-entity retail CELLARRAY (`TryGetRetailCellArray`) plus
per-cell part entries (`GetRetailPartEntriesInCell`), computed once at the
SAME registration transaction as the collision flood
(`RegisterMultiPart`/`Register`'s optional `partArray:` parameter) — not
rebuilt per frame. `WalkProductionWorldData`'s indoor and outdoor static
sweeps BORROW that array whole per record; they no longer recompute
membership from each MeshRef's prepared visual AABB (the deleted
`ResolveStaticRenderCells` / `ShadowObjectRegistry.ComputeStaticRenderCells`
pair). The retail CELLARRAY remains distinct from `ShadowObjectRegistry`'s
own collision rows (`GetOwnerCells`/`_entityToCells`) — the two retail lists
share transit math but have different membership (collision cutover to the
same CELLARRAY is S2 chunk 3) — until then, a record whose registry entry has
no retail array yet (a streaming-window race between the static-projection
journal and the physics publisher) falls back to its authored parent cell
alone, counted by `WalkProductionWorldData.UnregisteredStaticRenderFallbackCount`.
A primitive-only Setup may reuse its already-authored cylsphere collision
cell set; BSP-bearing and pure-visual statics use the all-visual-part box
walk. The Facility Hub stair Setup `0x02000623` is the installed-DAT
regression: its authored parent is `0x8A02015F`, while its visual parts also
register in `0x8A02015E` and the adjoining vertical cells.
Moving multipart objects follow the sibling retail route rather than their
authored/feet cell alone: `CPhysicsObj::add_shadows_to_cells` installs every