acdream/tests
Erik 0cc561c4d0 fix(render): doorway void — portal near-clip was near-dependent (eye-clip instead)
The cottage doorway 'void' (dark cell + floating entities while the chase camera looks
through the opening): PortalProjection.ProjectToNdc clipped portals on w+z>=0 — the GL
[-1,1] near-plane test — but acdream's camera builds its projection with D3D-convention
Matrix4x4.CreatePerspectiveFieldOfView and a 1.0 m near plane (RetailChaseCamera). Against
that matrix w+z>=0 discards everything within ~0.5 m of the eye, so when the camera orbits
to ~0.1 m from a doorway portal the near edge is clipped, the far edge projects off-screen
([flap] showed p->0171 D=0.10 proj=4 clip=0 ndc Y=-3.5..-6.6), the room behind is culled
(vis=1) and only the tiny vestibule shell draws -> dark void. Rotating away moved the eye
off the portal -> vis=5 -> room rendered.

Fix: clip against the EYE (w > MinW, MinW=0.05 m), near-INDEPENDENT — a portal you're
standing in still projects (covers the screen) so the cell behind stays visible. We only
use the projected x/y for the visibility clip region, so keeping vertices in front of the
near plane is correct. Matches retail PView::GetClip near-clipping the portal before project.
RED->GREEN regression test (doorway 0.1 m from a near=1.0 eye); 177 App tests green; the
existing straddling ±50 bound still holds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 13:42:46 +02:00
..
AcDream.App.Tests fix(render): doorway void — portal near-clip was near-dependent (eye-clip instead) 2026-06-03 13:42:46 +02:00
AcDream.Core.Net.Tests fix(retail): rotation rate, useability gate, retail toast strings 2026-05-16 12:17:54 +02:00
AcDream.Core.Tests fix(render): doorway blue-hole — render root clobbered by NPCs (CurrCell per-entity write) 2026-06-03 10:12:38 +02:00
AcDream.Core.Tests.Fixtures.HelloPlugin feat(core): add PluginLoader with collectible ALC 2026-04-10 09:51:16 +02:00
AcDream.UI.Abstractions.Tests feat(physics): Cluster A — indoor BSP collision probe 2026-05-19 14:24:07 +02:00