[PR #3483] [MERGED] World, streaming, meshing and the renderer read the level's column #5013

Closed
opened 2026-11-03 05:09:35 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3483
Author: @ThatCakeIsAPie
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @ludovic111

Base: main ← Head: feat/level-shape-4


📝 Commits (7)

  • 46c62bd LevelShape: each level's shape as one value, and the column its chunks hold
  • a6d8409 Light reads the chunk's column: flood fill, layers and relighting span its sections
  • c2b5547 World, streaming, meshing and the renderer read the level's column
  • bc3383d Merge remote-tracking branch 'origin/main' into pt1-3481
  • 536c3b9 LevelShape helpers are pub, and for_dir sits beside the type
  • c18e893 Merge branch 'pt1-3481' into pt1-3482
  • 0c149c7 Merge main (through the carried #3482) into level-shape-4

📊 Changes

12 files changed (+650 additions, -142 deletions)

View changed files

📝 crates/horizon-client-render/src/chunk.rs (+274 -18)
📝 crates/horizon-client-render/src/chunk_map.rs (+3 -0)
📝 crates/horizon-client-render/src/gfx.rs (+28 -13)
📝 crates/horizon-client-render/src/gfx/resident.rs (+18 -10)
📝 crates/horizon-client-render/src/light.rs (+130 -27)
📝 crates/horizon-client-render/src/mesher.rs (+2 -2)
📝 crates/horizon-client-render/src/streaming.rs (+7 -7)
📝 crates/horizon-client-render/src/world.rs (+26 -13)
📝 crates/horizon-client/src/game.rs (+3 -3)
📝 crates/horizon-client/src/game/remote.rs (+3 -3)
📝 crates/horizon-client/src/save.rs (+1 -46)
➕ crates/horizon-client/tests/tall_column.rs (+155 -0)

📄 Description

🤖 Opened by ThatCakeIsAPie's AI agent (Claude), not by ThatCakeIsAPie themself.

Builds on #3482 (feat/level-shape-3): until that merges, its commits show here too; this PR's own change is the commit(s) on top.

What and why

Part 4 of the level-shape series (part 2 has the background). The resident world and everything that streams, meshes and draws it now read the level's column instead of the fixed -64..320:

  • World.shape is the level's LevelShape, and World::layout() is its chunks' column. World::set checks the chunk's own range, and the heightmap fallbacks and may_hold read the column. DirtySections bounds section indexes by the mask (256), not by the vanilla count.
  • Streaming marks the column's sections dirty (new, lit, relit and edited chunks).
  • The mesher places a section from its chunk's min_y.
  • The renderer builds its occlusion graph, complete-column mask (lod_detail_columns), section origins (resident::origin) and camera section for the column of the level it was cleared for: clear_sections(layout), called where a world opens or the level changes, after the new World exists.

Every level still gets the vanilla Overworld's shape here, so nothing changes yet.

Vanilla reference

None

Self-check

Tests

  • tests/tall_column.rs: a 131-section level (-64..2032, To The Max's height) streams saved columns through Streaming. Each centre column lights and meshes to y 2031, and a torch placed at y 1800 relights its neighbourhood and remeshes the 16 sections it reaches, byte for byte what a fresh mesh gives. Needs the prepared resources (skipped without them), 35 s.
  • The existing world, streaming, gfx and mesher tests, and tests/streaming_meshes.rs, run on the vanilla column.

Run before this branch was rebased from upstream/main 56f968e11 onto fe3333f3f. After the rebase, CI's two clippy commands pass on it again, and pr_ready was re-run at the top of its series (#3490).

pr_ready (tools/pr_ready.py --quick --base upstream/main on DESKTOP-LT6RAH8, against upstream/main at 56f968e11, 25 min 18 s)

Check Result
Scope ⚠️ 20 files, +938 −250; 1033 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 398 run, FAILED (failures=2, errors=8, skipped=1) (1 min 41 s)
rustfmt ✅ (12 s)
clippy ✅ (2 min 39 s)
tests: horizon-client ❌ 1100 passed, 2 failed (15 min 42 s)
doc tests ✅ 0 passed (4 min 58 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The Scope row counts the whole stack against upstream main; this PR's own part (over feat/level-shape-3) is 8 files, +242 −53, 140 lines of code.

The Python tests fail on upstream main on this Windows machine too, more often there (main 56f968e11: failures=3, errors=13; path separators, symlink privilege). CI runs them on Linux.

crash::tests::stacks_start_at_the_panicking_frame and save::tests::session_lock_is_exclusive fail on upstream main here too (Windows only).

Suggested label: skip-release.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/3483 **Author:** [@ThatCakeIsAPie](https://github.com/ThatCakeIsAPie) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/level-shape-4` --- ### 📝 Commits (7) - [`46c62bd`](https://github.com/horizon-rust/horizon/commit/46c62bdf2a307b633d1ba6ea32b471ec0316c6d9) LevelShape: each level's shape as one value, and the column its chunks hold - [`a6d8409`](https://github.com/horizon-rust/horizon/commit/a6d8409466af6393be67ad2bf3a86b2fe8165906) Light reads the chunk's column: flood fill, layers and relighting span its sections - [`c2b5547`](https://github.com/horizon-rust/horizon/commit/c2b55479f119bb18bcd6fbbef33a1e23b8492086) World, streaming, meshing and the renderer read the level's column - [`bc3383d`](https://github.com/horizon-rust/horizon/commit/bc3383d1bfd77ab68ddb6c22d14e6ff826f74468) Merge remote-tracking branch 'origin/main' into pt1-3481 - [`536c3b9`](https://github.com/horizon-rust/horizon/commit/536c3b90fd77a059d46a93b6ccecbe1f216cd307) LevelShape helpers are pub, and for_dir sits beside the type - [`c18e893`](https://github.com/horizon-rust/horizon/commit/c18e893143f91b995c89c471432a99dab5eacc81) Merge branch 'pt1-3481' into pt1-3482 - [`0c149c7`](https://github.com/horizon-rust/horizon/commit/0c149c7d1c15c58357409376068f66cff69e1b26) Merge main (through the carried #3482) into level-shape-4 ### 📊 Changes **12 files changed** (+650 additions, -142 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/chunk.rs` (+274 -18) 📝 `crates/horizon-client-render/src/chunk_map.rs` (+3 -0) 📝 `crates/horizon-client-render/src/gfx.rs` (+28 -13) 📝 `crates/horizon-client-render/src/gfx/resident.rs` (+18 -10) 📝 `crates/horizon-client-render/src/light.rs` (+130 -27) 📝 `crates/horizon-client-render/src/mesher.rs` (+2 -2) 📝 `crates/horizon-client-render/src/streaming.rs` (+7 -7) 📝 `crates/horizon-client-render/src/world.rs` (+26 -13) 📝 `crates/horizon-client/src/game.rs` (+3 -3) 📝 `crates/horizon-client/src/game/remote.rs` (+3 -3) 📝 `crates/horizon-client/src/save.rs` (+1 -46) ➕ `crates/horizon-client/tests/tall_column.rs` (+155 -0) </details> ### 📄 Description > 🤖 Opened by ThatCakeIsAPie's AI agent (Claude), not by ThatCakeIsAPie themself. **Builds on #3482 (`feat/level-shape-3`)**: until that merges, its commits show here too; this PR's own change is the commit(s) on top. ## What and why Part 4 of the level-shape series (part 2 has the background). The resident world and everything that streams, meshes and draws it now read the level's column instead of the fixed `-64..320`: - `World.shape` is the level's `LevelShape`, and `World::layout()` is its chunks' column. `World::set` checks the chunk's own range, and the heightmap fallbacks and `may_hold` read the column. `DirtySections` bounds section indexes by the mask (256), not by the vanilla count. - Streaming marks the column's sections dirty (new, lit, relit and edited chunks). - The mesher places a section from its chunk's `min_y`. - The renderer builds its occlusion graph, complete-column mask (`lod_detail_columns`), section origins (`resident::origin`) and camera section for the column of the level it was cleared for: `clear_sections(layout)`, called where a world opens or the level changes, after the new `World` exists. Every level still gets the vanilla Overworld's shape here, so nothing changes yet. ## Vanilla reference None ## Self-check **Tests** - `tests/tall_column.rs`: a 131-section level (`-64..2032`, To The Max's height) streams saved columns through `Streaming`. Each centre column lights and meshes to y 2031, and a torch placed at y 1800 relights its neighbourhood and remeshes the 16 sections it reaches, byte for byte what a fresh mesh gives. Needs the prepared resources (skipped without them), 35 s. - The existing world, streaming, gfx and mesher tests, and `tests/streaming_meshes.rs`, run on the vanilla column. Run before this branch was rebased from upstream/main 56f968e11 onto fe3333f3f. After the rebase, CI's two clippy commands pass on it again, and pr_ready was re-run at the top of its series (#3490). **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on DESKTOP-LT6RAH8, against upstream/main at 56f968e11, 25 min 18 s) | Check | Result | | --- | --- | | Scope | ⚠️ 20 files, +938 −250; 1033 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 398 run, FAILED (failures=2, errors=8, skipped=1) (1 min 41 s) | | rustfmt | ✅ (12 s) | | clippy | ✅ (2 min 39 s) | | tests: horizon-client | ❌ 1100 passed, 2 failed (15 min 42 s) | | doc tests | ✅ 0 passed (4 min 58 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The Scope row counts the whole stack against upstream main; this PR's own part (over `feat/level-shape-3`) is 8 files, +242 −53, 140 lines of code. The Python tests fail on upstream main on this Windows machine too, more often there (main 56f968e11: failures=3, errors=13; path separators, symlink privilege). CI runs them on Linux. `crash::tests::stacks_start_at_the_panicking_frame` and `save::tests::session_lock_is_exclusive` fail on upstream main here too (Windows only). Suggested label: `skip-release`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:09:35 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5013
No description provided.