diff --git a/docs/research/2026-09-01-overhaul/s3-walk-ownership-map.md b/docs/research/2026-09-01-overhaul/s3-walk-ownership-map.md index a81ce0b5..389c89b2 100644 --- a/docs/research/2026-09-01-overhaul/s3-walk-ownership-map.md +++ b/docs/research/2026-09-01-overhaul/s3-walk-ownership-map.md @@ -487,3 +487,78 @@ owner's G2 screenshot spot) plus the two cathedral poses, pixel-diffed against the chunk-2 run: the ONLY expected delta is the punch region at Holtburg (fragments gone); dense-outdoor p50/p99 recorded before/after with the existing frame-time diagnostics (no new counters). + +## 10. Chunk 4 contract — deletions (lead draft, 2026-09-03; re-locate every owner at chunk time, after chunks 2 and 3 land) + +### 10.1 What retail clips, and what it does not (verified) + +- Retail polygon-clips exactly three things on the CPU with + `ACRender::polyClipFinish`: portal polygons when building child views + (`PView::GetClip` @0x005a4320 → `polyClipFinish`), the punch fans + (`DrawPortalPolyInternal` @0x0059bc90 clips the fan against the installed + view — `building_view` @0x0059f3bf during the building pass), and the + exit seals (the same function under `CEnvCell::setup_view` per live view, + @0x005a4983–0x005a49b7). Ordinary meshes, cell shells, terrain, particles + and the weather are NEVER view-clipped: `DrawMeshInternal` @0x0059f360 + submits the whole mesh after the sphere test, `DrawEnvCell` @0x0059f170 + draws the whole shell, `LScape::draw` draws whole blocks, and + `GameSky::Draw(sky, 1)` @0x00506396 runs ONCE after the blocks with only + the `is_player_outside` gate (§9 R5). + +### 10.2 acdream inventory (at `edb32783`; names, not lines) + +KEEP (translated clips with a retail CPU counterpart — each gets a +CPU/GPU equivalence pin if it lacks one): +- exit seals: `RetailPViewRenderer.DrawWalkExitPortalMasks` → + `DrawExitPortalMask(cell, InteriorFloodViewClipPlanesAt(...))` per (flood + cell, live view) — retail's `setup_view` + `polyClipFinish` per view; +- punch fans: `DrawPunchFan(worldPolygon, activeViewIndex)` clipped by the + pinned view's slice planes — retail's `building_view` clip; +- the walk's `CaptureViews`/`AppendClipSlot` slot table ONLY as far as the + two consumers above need it. + +DELETE (no retail counterpart): +- the whole-stage terrain event and `DrawTerrainSlice` leaf — already + replaced by chunk 3 (§9 R4); chunk 4 verifies nothing re-grew; +- the per-outside-view-slice weather/late landscape loop + (`RetailPViewRenderer` "GameSky's weather pass still runs through each + active landscape view": `SetTerrainClip` + `ClearClipRouting` + + `DrawLandscapeSliceLate` per slice with `BeginDoorwayScissor` + + `BindTerrainClip`) — retail draws the weather ONCE, unclipped; one + weather draw after the last land cell (chunk 3 places it; chunk 4 deletes + the loop, the scissor, and the terrain-clip binding if no consumer + remains); +- the sky-post-scene particle submission's per-slice `clipSlot: + slice.Slot` — retail inserts emitters into one unclipped alpha list; +- `RetailPViewPassExecutor.SetCellShellClipRouting` (no caller in src or + tests) and every `SetClipRouting`/`ClearClipRouting`/ + `UseIndoorMembershipOnlyRouting` call that becomes a no-op once no shell + or entity clip routing exists — the "first view clips the shell" residue; +- `WbDrawDispatcher.WalkClassify.ResolvePartClipSlots`'s slot LIST return + shape: it already answers "whole mesh" (`RetailWholeMeshSlot`) whenever + any view admits the sphere; reduce it to the Boolean retail asks + (`SphereVisibleInLookInTurn`) and delete `VisibleClipSlotsInLookInTurn` + if the seals/punches do not use it (they read planes, not slots — verify); +- the `ProbeCathedralSkip*` discriminators (`ProbeCathedralSkipFloatingStairSeals`, + `…StairBuildingPunch`, `…FloatingStairCellShells`, `…SouthLookInCellShells`, + `…LookInShellCellId`, `…SouthBuildingShell`, `ProbeCathedralShellOrderEnabled`) + with their `docs/launch-options.md` rows and `RenderingDiagnostics` + members — the investigation they served is closed by the retail axiom + (the cathedral leak is retail behavior); the S5 inventory already lists + them, chunk 4 takes them because it touches every one of their call + sites anyway. + +### 10.3 Gate + +- no duplicate draw of a stamped part across a pan/zoom replay (the + existing replay pins); membership/draw counts change only at a retail view + boundary; +- the three-pose self-gate + Holtburg + the two cathedral poses pixel-diffed + against the chunk-3 run: expected delta ZERO except where a deleted + per-slice scissor previously under-painted the weather at an exit-view + edge (record the region if it appears; it is the deletion's intended + effect, not a regression); +- `LaunchOptionsDocumentationTests` green with the seven probe rows and + their read sites removed together (the test enforces both directions); +- the register: no row is added (every deletion removes an acdream-only + rule); any KEEP item still lacking a CPU/GPU equivalence pin gets one.