Skip to content

Roadmap #13 Batch B - viewport & camera - #31

Merged
AlexZ005 merged 1 commit into
mainfrom
feature/roadmap-13-viewport-camera
Jul 20, 2026
Merged

Roadmap #13 Batch B - viewport & camera#31
AlexZ005 merged 1 commit into
mainfrom
feature/roadmap-13-viewport-camera

Conversation

@AlexZ005

Copy link
Copy Markdown
Collaborator

Roadmap #13 — Batch B: viewport & camera

Second batch of roadmap #13. First-impression rendering + camera fixes.

Phase Change
B1 The infinite grid's fadeDistance now scales with the camera's distance from the origin (eased), so the grid no longer vanishes on far zoom-out. The fixed 100 units capped it regardless of how far cameraClip grows the far plane.
B2 N8AO "ghost" fix. The AO pass was sized to the logical CSS size, while postprocessing's composer.setSize sizes its passes to the physical drawing buffer (width × devicePixelRatio). On a HiDPI display the AO buffer was half-size, upsampled and offset — a shifted dark "ghost copy" of the shading. Now sized to the physical buffer.
B3 Configure Scene gains a Camera lens preset row — Wide (24mm) / Classic (35mm) / Natural (50mm) / Portrait (85mm), set as the matching vertical FOV — and the default camera FOV is now 40° (was an extreme-telephoto 15° that flattened the first impression).

Verification

  • B2 verified visually with before/after screenshots at devicePixelRatio: 2: the unfixed render shows a large dark AO ghost blob offset in the top-right corner; the fixed render is clean.
  • npm run build green; npx svelte-check held at 501/77.
  • New e2e suite tests/e2e/roadmap-13-viewport-camera.test.cjs — 5 checks, all pass (default FOV 40; each lens preset sets the expected vertical FOV).
  • B1 grid behavior confirmed in the same screenshots (grid extends to the horizon).

🤖 Generated with Claude Code

@AlexZ005
AlexZ005 merged commit 367c1d9 into main Jul 20, 2026
- B1: the infinite grid fadeDistance now scales with the camera distance from the
  origin (eased) so the grid no longer vanishes on far zoom-out; the fixed 100 units
  capped it regardless of the far plane
- B2: fix the N8AO ghost - the AO pass was sized to the LOGICAL CSS size while the
  composer sizes its passes to the physical drawing buffer (width x devicePixelRatio),
  so on HiDPI displays the AO buffer was half-size, upsampled and offset into a
  shifted dark copy of the shading; size it to the physical buffer (before/after
  verified at devicePixelRatio 2)
- B3: Configure Scene gains a Camera lens preset row (Wide 24mm / Classic 35mm /
  Natural 50mm / Portrait 85mm, set as vertical FOV) and the default camera FOV is
  now 40 degrees (was an extreme-telephoto 15 that flattened the first impression)
- e2e: roadmap-13-viewport-camera (5 checks, all pass); build green; svelte-check
  501/77 held

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@AlexZ005
AlexZ005 deleted the feature/roadmap-13-viewport-camera branch August 5, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant