Skip to content

fix(forest): keep the Barbara dock drawn when you walk out on it - #512

Merged
kitlangton merged 1 commit into
mainfrom
fix/barbara-dock-vanish
Oct 23, 2026
Merged

kitlangton merged 1 commit into
mainfrom
fix/barbara-dock-vanish

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What it does

The lake dock in BARBARA no longer vanishes when you walk out along it.

How it works

The forest bakes the dock into the 16 m chunk at its shore end, but each chunk's cull box was just its cell. The dock runs 11 m past that cell (z 75–91, cell 64–80), so once you stood past the cell edge looking out along it, the box was behind the camera and the whole chunk, dock included, was frustum-culled. buildForest now grows each chunk's box over its baked near/far vertices. Only 38 of 484 chunks in the demo world grow, by 0.1–8 m (camp, dock, string lights, logs), so the cost is negligible. Instanced crowns that overhang a cell are left as they were: padding them adds ~15% triangles per frame, which is a separate call.

Risk

Low. Bounds only grow, so nothing that drew before stops drawing. Only ForestView's frustum test reads the box.

Proof

  • New test packages/kit/forest/build.test.ts: every chunk's box holds all its static vertices (failed with 27 spills before the fix, passes after).
  • capture.ts --shots dockMid (halfway out the dock, looking along it), stills: ~/code/home/artifacts/barbara-dock-2026-10-23/dockMid-before.png (no deck, only water) and dockMid-after.png (deck drawn).
  • bun run verify: ok.

…bara dock stays drawn

The dock is baked into the chunk at its shore end, but chunk boxes were the 16 m cell. The dock runs 11 m past it,
so standing past the cell edge looking out along the dock culled the whole chunk and the deck vanished.
@kitlangton
kitlangton merged commit 80b7ff4 into main Oct 23, 2026
14 checks passed
@kitlangton
kitlangton deleted the fix/barbara-dock-vanish branch October 23, 2026 18:57
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