acdream/docs/research/2026-06-06-verbatim-drawcells-port-pickup-handoff.md
Erik 2ec8f41200 docs: implementation plan + pickup handoff — verbatim retail DrawCells port
Task-by-task plan (TDD pin for the grey regression + per-task visual gates) to replace the
indoor-render approximation with a verbatim PView::DrawCells port, sequenced so Task 2 alone
should kill the grey. Pickup handoff for a fresh session: state, baselines, rules, do-not-relitigate.
Local commit only (not pushed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 21:44:19 +02:00

4.8 KiB

Pickup Handoff — Verbatim Retail Indoor Render Port (execute in a new session) — 2026-06-06

This session designed and planned the verbatim retail DrawCells port; the next session executes it. Spec + plan are committed; render code is NOT yet changed for the port.

Start here (read in order)

  1. Plan (execute this): docs/superpowers/plans/2026-06-06-verbatim-retail-indoor-render-port.md
  2. Spec (the why): docs/superpowers/specs/2026-06-06-verbatim-retail-indoor-render-port-design.md
  3. Retail model: docs/research/2026-06-05-retail-pview-indoor-render-pseudocode.md

What this fixes (the user's 2-week pain)

Interior walls/floor render grey (clear color shows through) and geometry bleeds between cells; character cut in half on stairs; flap at transitions. Root, located in code: RetailPViewRenderer.cs:52 drops visible cells lacking a ClipFrameAssembler slot (grey), and :237 globally disabled the per-cell trim (bleed) because it was wrongly applied to objects (half-character). The fix = port retail PView::DrawCells (0x5a4840) verbatim: draw every OrderedVisibleCells cell's shell, trimmed per-slice via ClipPlaneSetgl_ClipDistance; objects membership+depth gated, no clip. Scope A+B (DrawInside + look-in DrawPortal).

Current tree state

  • Branch claude/thirsty-goldberg-51bb9b. Committed this session (local, NOT pushed): the spec (eb7b1fa) and the plan + this handoff.
  • Uncommitted (dirty) — KEEP, do not revert: this session's faithful work is the foundation the plan builds on —
    • PortalProjection.ProjectToClip / ClipToRegion = homogeneous GetClip/polyClipFinish (NEW, tested). PortalVisibilityBuilder rewired to use them (merged with a concurrent agent's [pv-trace] work). These are the membership + clip math; the plan does NOT touch them.
    • The rest of the dirty render tree (RetailPViewRenderer approximation, ClipFrameAssembler, GameWindow rework, ObjectMeshManager #6, etc.) is the tangle the plan rewrites/deletes.
  • Baselines (must hold at start): dotnet build -c Debug 0 errors; App.Tests 205/205; Core.Tests 1331 pass / 4 fail / 1 skip — the 4 fails are pre-existing Physics door/step-up (BSPStepUpTests.D4_Airborne…, two DoorBugTrajectoryReplay.LiveCompare_*, DoorCollisionApparatus…DocumentsBug), unrelated to render.

Rules (user-set, this worktree)

PowerShell on Windows; launch logs UTF-16. Do NOT branch/worktree, push, git stash/gc, or revert the dirty tree. Build before every launch. Acceptance is the user's eyes — do not claim a GL task done on a green build; only on the user's visual confirmation (the plan gates each GL task on a launch). Live server: ACE 127.0.0.1:9000, account testaccount/testpassword, char +Acdream (spawns at the Holtburg cottage). Graceful-close the client between launches (hard-kill leaves the ACE session stuck ~3 min).

DO NOT re-litigate (evidence-disproven)

  • The grey is shell-sealing / wrong-flood-root, NOT the portal projection. Do not "harden the w-clip" further — the clip math is already faithful this session. (Two handoffs contradicted on this; the 2026-06-05 shell-sealing handoff + the live visual were right.)
  • If, after every shell draws (per [render-sig] draw=[…]), walls are sealed but untextured (grey-but-drawn, vs. clear-color grey), that is a separate surface/texture bug (HEAD commit notes "interior walls grey") — file it; do not reopen membership/clip.

Subagent-driven (a fresh subagent per task, review between) or inline (executing-plans). The plan is sequenced so Task 2 alone should make the grey disappear — verify that with the user before continuing; it de-risks the whole effort.

Copy-paste pickup prompt

Execute the verbatim retail indoor render port in worktree thirsty-goldberg-51bb9b
(branch claude/thirsty-goldberg-51bb9b). Do NOT branch/worktree, push, git stash/gc, or
revert the dirty tree. PowerShell; launch logs UTF-16; build before launch; acceptance is the
user's eyes (gate every GL task on a launch + the user's visual OK).

Read first:
1) docs/superpowers/plans/2026-06-06-verbatim-retail-indoor-render-port.md  (execute this, task by task)
2) docs/superpowers/specs/2026-06-06-verbatim-retail-indoor-render-port-design.md
3) docs/research/2026-06-06-verbatim-drawcells-port-pickup-handoff.md  (state + rules + do-not-relitigate)

Confirm baselines (build 0 errors; App 205/205; Core 1331/4 pre-existing/1), then use
superpowers:executing-plans (or subagent-driven-development) to implement. Task 2 should make the
grey disappear — get the user's visual confirmation before continuing. The grey is shell-sealing,
NOT the projection; the clip math is already faithful — do not harden the w-clip.