acdream/tests/AcDream.App.Tests/Rendering
Erik 02acac5572 feat(app): UCG W2 Task 2 — render root from physics CurrCell (FindCameraCell fallback)
Wire the BFS visibility root to DataCache.CellGraph.CurrCell (the physics
membership answer written in W2 Task 1) rather than resolving independently
from a position via FindCameraCell.  Closes the render/physics disagreement
that causes the "world from below" spawn-in flicker.

Changes:
- CellVisibility.GetVisibleCells: extracted BFS body into new private
  GetVisibleCellsFromRoot(LoadedCell root, Vector3 cameraPos); existing
  GetVisibleCells delegates to it after FindCameraCell (behavior unchanged).
- CellVisibility.ComputeVisibilityFromRoot(LoadedCell? root, Vector3 fallbackPos):
  new public entry point; when root is null falls through to ComputeVisibility
  (exact today's behavior), otherwise sets _lastCameraCell = root and delegates
  to GetVisibleCellsFromRoot — cannot regress below baseline.
- GameWindow (line 7156): replaced ComputeVisibility(visRootPos) with
  ComputeVisibilityFromRoot(physicsRoot, visRootPos) where physicsRoot is
  resolved from _physicsEngine.DataCache.CellGraph.CurrCell via TryGetCell.
  physicsRoot is null whenever CurrCell is null or its id is not yet in the
  render registry, so the fallback fires until the cell loads.
- 6 new tests in CellVisibilityFromRootTests: null-root fallback equivalence
  (3 cases), registered root → CameraCell == root (3 cases).  All 160 App.Tests
  pass, 0 regressions.

Visual verification PENDING — behavior change; do not claim it works visually.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 10:24:23 +02:00
..
Wb test(render): Phase U.4 — cover ResolveEntitySlot clip-slot resolution 2026-05-30 18:16:21 +02:00
CameraCollisionIndoorTests.cs fix(physics): M1.5 — viewer-exempt the #98 indoor shadow gate so the camera eye collides the cottage shell enclosure 2026-05-31 18:49:39 +02:00
CameraControllerTests.cs feat(camera): InputAction + DebugVM surface for retail chase camera 2026-05-18 20:04:34 +02:00
CellVisibilityFromRootTests.cs feat(app): UCG W2 Task 2 — render root from physics CurrCell (FindCameraCell fallback) 2026-06-02 10:24:23 +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): Phase U.4 — unified gated draw pass (indoor root) 2026-05-30 17:59:21 +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): Phase U.2c — ClipPlaneSet (NDC convex region → gl_ClipDistance planes) 2026-05-30 17:03:32 +02:00
PhysicsCameraCollisionProbeTests.cs feat(render): Phase A8.F — PhysicsCameraCollisionProbe (swept-sphere eye via ResolveWithTransition) 2026-05-29 19:01:21 +02:00
PortalProjectionTests.cs feat(render): Phase A8.F — PortalProjection with GL near-plane clip (z>=-w) 2026-05-29 11:48:49 +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 fix(render): Phase U.4c — root indoor visibility at the player's cell (the flap) 2026-05-31 14:35:21 +02:00
RetailChaseCameraTests.cs fix(render): Phase A8.F — camera collision no longer corrupts the damped eye (wall-press vibration) 2026-05-30 09:40:08 +02:00
ScreenPolygonClipTests.cs feat(render): Phase A8.F — ScreenPolygonClip 2D convex-polygon intersection 2026-05-29 11:37:30 +02:00