[PR #6802] [MERGED] Mesher: review follow-ups from #6503 (one outside-light rule, solid_rows, fill test with real light) #7106

Closed
opened 2026-11-03 06:33:56 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6802
Author: @ludovic111
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: perf/mesh-review-nits


📝 Commits (3)

  • 961618f Mesher: review follow-ups from #6503
  • abaabf5 Mesher: the fill test's column is 32 sections tall
  • 6ce752b Merge remote-tracking branch 'origin/main' into perf/mesh-review-nits

📊 Changes

5 files changed (+98 additions, -33 deletions)

View changed files

📝 crates/horizon-client-render/src/chunk.rs (+12 -6)
📝 crates/horizon-client-render/src/mesher.rs (+15 -19)
📝 crates/horizon-client-render/src/mesher/reuse_tests.rs (+60 -1)
📝 crates/horizon-client-render/src/mesher/sides.rs (+5 -4)
📝 crates/horizon-core/src/paletted.rs (+6 -3)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Follow-ups from @some-du6e's review of #6503 (thanks!), now that the mesher stack (#6502, #6503, #6535, #6672) has landed. No change in behaviour.

  • One rule for the light outside a column. Padded::fill re-implemented Chunk::light's outside-the-column rule (none below the sections, full sky above). Both now go through the new Chunk::section_at(y) -> Result<&Section, u8>, so they can't drift apart. The redundant .filter(|_| s >= 0) is gone with it.
  • Names. MeshScratch::opaque and opaque_rows become solid_rows. They hold isSolidRender (MeshTables::solid), while OPAQUE_LAYER in the same module means the render layer.
  • Docs. sides::sort and SortScratch now describe the integer keys. The quad's index ends each key, which keeps ties in the mesher's order; there is no stable sort any more.
  • Tests.
    • New padded_fill_reads_every_neighbour_and_its_light_like_chunk_reads. All nine chunks are loaded, with random blocks and per-block (Light::Full) light, and the sections tested sit at both ends of a 32-section column, so the padding reaches outside it. Every padded cell is checked against Chunk::get and Chunk::light. The existing test only covered uniform light and the east neighbour.
    • get_run is now checked against the stored values instead of get.

Checks on playhorizon:

  • clippy -D warnings on horizon-client-render and horizon-core with all targets: clean.
  • cargo test --release -p horizon-client-render --lib -- mesher chunk --include-ignored with prepared resources: 96 passed. The one failure is lod::tests::real_mesh_clips_near_chunks…, which fails the same way on main before the mesher stack (0454e97e3: left -0.0, right 261888.0 at lod.rs:3073), so it is main's.
  • paletted tests: pass.
  • tools/pr_ready.py --quick is running; its block will be posted as a comment.

skip-release: players see no change.

🤖 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/6802 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/mesh-review-nits` --- ### 📝 Commits (3) - [`961618f`](https://github.com/horizon-rust/horizon/commit/961618fd6ad42906ab57b401017df9d2b509267d) Mesher: review follow-ups from #6503 - [`abaabf5`](https://github.com/horizon-rust/horizon/commit/abaabf5cb0f3bd5df4158df97547d257429e7d38) Mesher: the fill test's column is 32 sections tall - [`6ce752b`](https://github.com/horizon-rust/horizon/commit/6ce752baa87c89f06a6a51f60697847a39d3abd3) Merge remote-tracking branch 'origin/main' into perf/mesh-review-nits ### 📊 Changes **5 files changed** (+98 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/chunk.rs` (+12 -6) 📝 `crates/horizon-client-render/src/mesher.rs` (+15 -19) 📝 `crates/horizon-client-render/src/mesher/reuse_tests.rs` (+60 -1) 📝 `crates/horizon-client-render/src/mesher/sides.rs` (+5 -4) 📝 `crates/horizon-core/src/paletted.rs` (+6 -3) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Follow-ups from @some-du6e's review of #6503 (thanks!), now that the mesher stack (#6502, #6503, #6535, #6672) has landed. No change in behaviour. - **One rule for the light outside a column.** `Padded::fill` re-implemented `Chunk::light`'s outside-the-column rule (none below the sections, full sky above). Both now go through the new `Chunk::section_at(y) -> Result<&Section, u8>`, so they can't drift apart. The redundant `.filter(|_| s >= 0)` is gone with it. - **Names.** `MeshScratch::opaque` and `opaque_rows` become `solid_rows`. They hold `isSolidRender` (`MeshTables::solid`), while `OPAQUE_LAYER` in the same module means the render layer. - **Docs.** `sides::sort` and `SortScratch` now describe the integer keys. The quad's index ends each key, which keeps ties in the mesher's order; there is no stable sort any more. - **Tests.** - New `padded_fill_reads_every_neighbour_and_its_light_like_chunk_reads`. All nine chunks are loaded, with random blocks and per-block (`Light::Full`) light, and the sections tested sit at both ends of a 32-section column, so the padding reaches outside it. Every padded cell is checked against `Chunk::get` and `Chunk::light`. The existing test only covered uniform light and the east neighbour. - `get_run` is now checked against the stored values instead of `get`. Checks on playhorizon: - clippy `-D warnings` on horizon-client-render and horizon-core with all targets: clean. - `cargo test --release -p horizon-client-render --lib -- mesher chunk --include-ignored` with prepared resources: 96 passed. The one failure is `lod::tests::real_mesh_clips_near_chunks…`, which fails the same way on main before the mesher stack (0454e97e3: `left -0.0, right 261888.0` at `lod.rs:3073`), so it is main's. - `paletted` tests: pass. - `tools/pr_ready.py --quick` is running; its block will be posted as a comment. skip-release: players see no change. 🤖 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 06:33:56 +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#7106
No description provided.