revert(render): BR-2 depth discipline - the gate proved #108 is MEMBERSHIP, not depth

Visual gate (2026-06-11) on the seal+punch build, then on the punch-reverted
build, isolated the truth:
- With the punch wired: #108 (cellar grass-sweep) gone BUT the player/NPCs
  go transparent by exactly their overlap with any doorway viewed from
  outside (the far-Z punch erases the depth of dynamic objects standing in
  the aperture, so the interior paints over them).
- With ONLY the punch reverted (seal+full-clear kept): characters render
  correctly AND #108 is BACK.

The punch is wired for OUTDOOR roots + the look-in path ONLY; it never runs
on a clean interior (cellar) frame. For it to have suppressed #108, the
cellar-transition frames must render through the OUTDOOR root -> the player
is being classified OUTDOOR mid-cellar (the known #112/#106 cellar
membership ping-pong). So:
- #108 is a MEMBERSHIP bug (render is downstream of membership); the punch
  was MASKING it, harmfully. Re-attributed to the membership track.
- The interior-root SEAL addresses a case that is NOT #108 (confirmed: #108
  isn't an interior-root frame), so it has no verified visible effect yet.

Per no-workarounds + verify-before-layering: reverted ALL of BR-2's depth
machinery (seal, punch, the per-slice->full-clear swap) to the pre-BR-2
baseline (restored from 6cba950). The phantom-site probe (6cba950) is kept.
PortalDepthMaskRenderer.cs is KEPT as a RESERVED, unwired primitive (it is
verified-correct; the depth discipline will be rebuilt during BR-3 with
dynamics-after-interior ordering, where it can be verified against the
shell-chop deletion).

What survives from this session's execution: BR-1 (already-equivalent,
695eca2) stands. #108 moves to membership. BR-2 to be re-approached under
BR-3 with correct ordering. No net production behavior change vs 6cba950.

Suites: build green, App 226 green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-11 10:35:57 +02:00
parent 4ac547f6eb
commit 88be519ec0
3 changed files with 29 additions and 96 deletions

View file

@ -9,6 +9,18 @@ namespace AcDream.App.Rendering;
/// writes — the port of <c>D3DPolyRender::DrawPortalPolyInternal</c>
/// (Ghidra 0x0059bc90, pc:424490).
///
/// <para><b>⚠ RESERVED — NOT wired into the frame as of 2026-06-11.</b> The
/// first BR-2 attempt wired this as a seal (interior root) + punch (outdoor /
/// look-in) and was reverted at the visual gate: the outdoor far-Z punch
/// erased the depth of DYNAMIC objects (player / NPCs) standing in a door
/// aperture, so the interior painted over them. The gate also proved #108
/// (cellar grass-sweep) is a MEMBERSHIP bug, not a depth bug — the punch was
/// only masking it on outdoor-classified cellar frames. The correct depth
/// discipline (punch → interior → dynamics-last ordering) will be rebuilt
/// during BR-3 when it can be verified against the shell-chop deletion. This
/// class is the verified-correct depth-write primitive kept for that work; it
/// has no callers today.</para>
///
/// <para>Retail projects a portal polygon, software-clips it against the
/// installed portal view (<c>polyClipFinish</c>), and draws the survivor as a
/// COLOR-INVISIBLE triangle fan with depth-test ALWAYS + depth-write ON:</para>