acdream/src/AcDream.App/Rendering
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
..
Shaders feat(render): Phase W Stage 4 — sky/weather portal-clip seal (LScape through the doorway) 2026-06-02 16:15:08 +02:00
Sky refactor(sky): replace per-frame wrap-mode mutation with persistent samplers 2026-04-29 08:08:26 +02:00
Vfx feat(vfx #C.1.5b): activator handles dat-hydrated entities + per-part transforms 2026-05-12 00:02:16 +02:00
Wb fix(render): R1 — repurpose the ParentCellId==null cell-gate bypass (#78) 2026-06-02 20:10:26 +02:00
BitmapFont.cs feat(ui): debug overlay + refined input controls 2026-04-17 18:45:38 +02:00
CameraController.cs feat(camera): InputAction + DebugVM surface for retail chase camera 2026-05-18 20:04:34 +02:00
CellVisibility.cs refactor(render): Stage 3 T3.1 — delete FindCameraCell AABB grace-frame fallback 2026-06-02 15:36:47 +02:00
ChaseCamera.cs fix(camera): pin chase-camera Z to last-grounded while airborne 2026-04-26 18:23:02 +02:00
ClipFrame.cs feat(render): Phase U.4 — unified gated draw pass (indoor root) 2026-05-30 17:59:21 +02:00
ClipFrameAssembler.cs feat(render): Phase W Stage 4 — sky/weather portal-clip seal (LScape through the doorway) 2026-06-02 16:15:08 +02:00
ClipPlaneSet.cs feat(render): Phase U.2c — ClipPlaneSet (NDC convex region → gl_ClipDistance planes) 2026-05-30 17:03:32 +02:00
DebugLineRenderer.cs feat(ui): debug overlay + refined input controls 2026-04-17 18:45:38 +02:00
FlyCamera.cs feat(app): slow default fly speed and add Shift-boost 2026-04-11 19:19:12 +02:00
FrustumCuller.cs feat(app): Phase A.2 — FrustumCuller + FrustumPlanes (Gribb-Hartmann) 2026-04-12 08:49:17 +02:00
GameWindow.cs feat(render): V1 — render keys on the viewer cell+eye; lighting stays on the player 2026-06-03 12:40:10 +02:00
ICamera.cs feat(app): extract ICamera interface from OrbitCamera 2026-04-10 20:24:29 +02:00
ICameraCollisionProbe.cs refactor(render): SweepEye returns (Eye, ViewerCellId) — surface the swept viewer cell 2026-06-03 12:32:45 +02:00
InteriorEntityPartition.cs feat(render): R1 — InteriorEntityPartition (3-bucket per-cell entity split) 2026-06-02 19:53:42 +02:00
InteriorRenderer.cs feat(render): R1 — binary render decision, indoor = per-cell DrawInside only 2026-06-02 20:01:53 +02:00
OrbitCamera.cs feat(app): extract ICamera interface from OrbitCamera 2026-04-10 20:24:29 +02:00
ParticleRenderer.cs feat(vfx): Phase C.1 — PES particle renderer + post-review fixes 2026-04-28 22:47:11 +02:00
PhysicsCameraCollisionProbe.cs refactor(render): SweepEye returns (Eye, ViewerCellId) — surface the swept viewer cell 2026-06-03 12:32:45 +02:00
PortalProjection.cs fix(render): doorway void — portal near-clip was near-dependent (eye-clip instead) 2026-06-03 13:42:46 +02:00
PortalView.cs feat(render): Phase A8.F — ViewPolygon + CellView clip-region data model 2026-05-29 11:30:28 +02:00
PortalVisibilityBuilder.cs diag(render): Phase U.4c — flap probe logs projected NDC coords + clip result 2026-05-31 14:21:46 +02:00
RetailChaseCamera.cs feat(render): RetailChaseCamera.ViewerCellId — the swept viewer cell (retail viewer_cell) 2026-06-03 12:34:07 +02:00
SamplerCache.cs refactor(sky): replace per-frame wrap-mode mutation with persistent samplers 2026-04-29 08:08:26 +02:00
SceneLightingUboBinding.cs feat(render): Phase G.1/G.2 — SceneLighting UBO + sky renderer + shader integration 2026-04-19 10:39:48 +02:00
ScreenPolygonClip.cs feat(render): Phase A8.F — ScreenPolygonClip 2D convex-polygon intersection 2026-05-29 11:37:30 +02:00
Shader.cs feat(ui): debug overlay + refined input controls 2026-04-17 18:45:38 +02:00
TerrainAtlas.cs feat(A.5 T22.5): wire QualityPreset into renderer + streaming (commit 2/2) 2026-05-10 08:43:06 +02:00
TerrainModernRenderer.cs docs(render): Phase W Stage 4 — verify ceiling-sealed / terrain-viewpoint / GL-state + ParentCellId 2026-06-02 16:24:23 +02:00
TextRenderer.cs feat(ui): debug overlay + refined input controls 2026-04-17 18:45:38 +02:00
TextureCache.cs docs(perf): Phase N.6 slice 1 — radius=12 baseline + surface dump path 2026-05-11 12:34:10 +02:00