acdream/tests/AcDream.App.Tests/Rendering
Erik 987313aa54 knife-edge port: polyClipFinish W=0 eye-plane clip + degenerate-view propagation; EyeInsidePortalOpening rescue DELETED
Ports retail ACRender::polyClipFinish (0x006b6d00, pc:702749) near-eye
semantics into PortalProjection.ProjectToClip - the fundamental fix for
the in-plane portal clip family (climb strobes, tower-top roof/floor
flap while turning; live-corroborated this session: [viewer-diff]
0xAAB30108 strobing 27x mid-climb, whole interior dropping at the top).
Pseudocode: docs/research/2026-06-11-polyclipfinish-w0-clip-pseudocode.md.

Three legs, all decomp-driven:

1. ProjectToClip clips at w >= 0 EXACTLY (was EyePlaneW=1e-4), with
   retail's any-negative-w gate. Boundary intersections land at w == 0
   (homogeneous directions), so a portal the eye is CROSSING yields the
   correct unbounded half-region that the bounded view-region clip cuts
   to the screen. A w=0 vertex cannot survive a bounded region clip
   into the divide (direction fails some edge of any bounded convex
   region); the measure-zero corner case is guarded non-finite->empty.

2. CellView.CanonicalKey keys ALL-COLLINEAR (zero-area) views as their
   snapped segment ("L:" + extremes) instead of rejecting them - retail
   PROPAGATES degenerate views (ClipPortals decomp:433651-433711
   forwards any count!=0 GetClip output, no area gate anywhere), keeping
   the cell behind an exactly-in-plane portal in the draw list (cells
   draw whole; onward floods die naturally). Rejection dropped the
   whole chain for the frame - the parked-eye knife-edge band. Finite
   key space unchanged -> dedup + strict-growth convergence intact.

3. The EyeInsidePortalOpening rescue is DELETED (the T2-documented
   compensation for the 1e-4 divergence) along with EyeStandingPerpDist
   + PointInPoly2D. Empty clip = no flood, period (retail's rule).
   CornerFloodReplay - the gate that REFUTED the previous deletion
   attempt - passes WITHOUT the rescue under the W=0 port.

Harness criterion corrected to retail's rules (it codified the rescue):
cells fully BEHIND the camera are not required (all-behind portals clip
empty in retail); monotone area holds per root regime; the two
manufactured exact-on-plane steps assert root-only (boundary root pick
is ambiguous; the in-plane portal there is ~perpendicular to the gaze =
genuinely off-screen). Build_CollapsedInteriorPortalNearEye test
inverted to pin the retail empty-clip rule (it pinned the rescue).

New pins: eye-crossing portal -> w==0 boundary verts + half-region (not
sliver); gaze-along-plane degenerate view accepted + segment-key dedup;
non-finite guard. Replay harnesses (CornerFloodReplay, Issue120,
TowerAscent, HouseExit, Issue127) all green.

Suites: App 246+1skip / Core 1430+2skip / UI 420 / Net 294.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 21:44:23 +02:00
..
Wb feat(render): indoor render WORKS — terminating portal flood + every-cell seal + look-in FPS 2026-06-07 10:14:43 +02:00
CameraCollisionIndoorTests.cs T6 (BR-7) C3: per-cell shadow architecture - flood registration, building channel, per-cell query; b3ce505 stopgap DELETED (closes #99) 2026-06-11 14:37:50 +02:00
CameraCollisionUpdateViewerTests.cs feat(A): wire SweepEye to the verbatim update_viewer (start-cell + fallbacks) 2026-06-05 11:10:32 +02:00
CameraControllerTests.cs feat(camera): InputAction + DebugVM surface for retail chase camera 2026-05-18 20:04:34 +02:00
CellViewDedupTests.cs feat(render): indoor render WORKS — terminating portal flood + every-cell seal + look-in FPS 2026-06-07 10:14:43 +02:00
CellVisibilityFromRootTests.cs refactor(render): Stage 3 T3.1 — delete FindCameraCell AABB grace-frame fallback 2026-06-02 15:36:47 +02:00
CellVisibilityPortalPolygonsTests.cs fix(render): Phase U.2b — resolve reciprocal portal by other_portal_id (retail 433557) 2026-05-30 16:56:00 +02:00
ClipFrameAssemblerTests.cs feat(render): indoor render WORKS — terminating portal flood + every-cell seal + look-in FPS 2026-06-07 10:14:43 +02:00
ClipFrameLayoutTests.cs feat(render): Phase U.3 — GPU clip-plane gate (gl_ClipDistance), no-clip default 2026-05-30 17:27:30 +02:00
ClipPlaneSetTests.cs feat(render): indoor render WORKS — terminating portal flood + every-cell seal + look-in FPS 2026-06-07 10:14:43 +02:00
CornerFloodReplayTests.cs knife-edge port: polyClipFinish W=0 eye-plane clip + degenerate-view propagation; EyeInsidePortalOpening rescue DELETED 2026-06-11 21:44:23 +02:00
EntityClipTests.cs fix(render): R1 — repurpose the ParentCellId==null cell-gate bypass (#78) 2026-06-02 20:10:26 +02:00
HouseExitWalkReplayTests.cs #118: outdoor dynamics draw in the outside stage under interior roots - the house-exit clip+vanish was the SEAL z-killing the player 2026-06-11 16:49:29 +02:00
IndoorDrawPlanTests.cs feat(render): IndoorDrawPlan.ShellPass — every visible cell, no drawable filter (R1) 2026-06-06 21:59:26 +02:00
InteriorEntityPartitionTests.cs T1 (fused BR-2/3): retail frame order - dynamics last, punch+seal, shell chop deleted 2026-06-11 11:16:27 +02:00
Issue113DrawingBspFilterTests.cs fix(render): #113 root cause #2 - GfxObj meshes draw only DrawingBSP-referenced polys (the REAL phantom staircase) 2026-06-10 20:52:52 +02:00
Issue113MeetingHallFloodTests.cs fix(render): #113 - enable GL clip distances for the PView shell pass (phantom exterior staircase) 2026-06-10 16:26:55 +02:00
Issue120ReciprocalPingPongTests.cs #119-residual: tower-ascent harness pins the roof-lip flood gap; barrel claim RETRACTED (user axiom: not in retail) 2026-06-11 18:34:45 +02:00
Issue127FloodFlipReplayTests.cs #119-residual ROOT CAUSE: the +0.02 m render lift leaked into the portal-visibility graph - horizontal portals side-culled anyone standing on them 2026-06-11 19:26:06 +02:00
OutdoorCellNodeTests.cs feat(render): R-A2 — per-building floods (the flap fix) 2026-06-08 18:44:43 +02:00
PhysicsCameraCollisionProbeTests.cs feat(A): wire SweepEye to the verbatim update_viewer (start-cell + fallbacks) 2026-06-05 11:10:32 +02:00
PortalProjectionTests.cs knife-edge port: polyClipFinish W=0 eye-plane clip + degenerate-view propagation; EyeInsidePortalOpening rescue DELETED 2026-06-11 21:44:23 +02:00
PortalViewTests.cs feat(render): Phase A8.F — ViewPolygon + CellView clip-region data model 2026-05-29 11:30:28 +02:00
PortalVisibilityBuilderTests.cs knife-edge port: polyClipFinish W=0 eye-plane clip + degenerate-view propagation; EyeInsidePortalOpening rescue DELETED 2026-06-11 21:44:23 +02:00
PortalVisibilityRobustnessTests.cs feat(render): R-A2 — per-building floods (the flap fix) 2026-06-08 18:44:43 +02:00
RetailChaseCameraTests.cs fix(render): Part 1 — camera boom convergence snap (kills the at-rest viewer-cell flicker trigger) 2026-06-05 15:56:04 +02:00
ScreenPolygonClipTests.cs feat(render): Phase A8.F — ScreenPolygonClip 2D convex-polygon intersection 2026-05-29 11:37:30 +02:00
TowerAscentReplayTests.cs #119-residual ROOT CAUSE: the +0.02 m render lift leaked into the portal-visibility graph - horizontal portals side-culled anyone standing on them 2026-06-11 19:26:06 +02:00