[PR #297] [MERGED] Rebuild every section when See-Through Leaves, Smooth Lighting or Biome Blend changes #2468

Closed
opened 2026-11-02 15:56:25 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/297
Author: @ludovic111
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @ludovic111

Base: main ← Head: fix/leaves-option-remesh


📝 Commits (1)

  • 81b07d1 Rebuild every section when a meshing option changes like vanilla

📊 Changes

2 files changed (+17 additions, -7 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+16 -0)
📝 crates/horizon-client/src/game/debug_keys.rs (+1 -7)

📄 Description

Fixes #273

What

Turning See-Through Leaves, Smooth Lighting or Biome Blend on or off now rebuilds every loaded section, like vanilla's LevelExtractor.allChanged. F3+A shares the same helper.

Why

In vanilla, Options.cutoutLeaves, ambientOcclusion and biomeBlendRadius all call allChanged when their value changes. Horizon only handed the new value to the mesher. After turning See-Through Leaves off, every loaded section kept its see-through leaves (pale against the sky), while sections rebuilt later (block updates, newly loaded chunks) got opaque leaves. That left the washed-out patches in view. The opaque-leaves rendering itself (solid layer, dark_cutout texture, foliage tint, LeavesBlock.skipRendering) already matched vanilla.

How tested

Before/after on the Mac mini (--offscreen, horizon-ctl screenshot): load with See-Through Leaves on, then turn it off from Graphics: Advanced.

  • Before: four leaf blocks in front of a red wool wall still show the red through their holes after the switch, and only the re-meshed trees turn opaque, so the view is a mix.
  • After: everything turns opaque at once.

Self-check (Mac mini, all three fixes on main)

cargo fmt --all --check                                   ok
cargo clippy --workspace --all-targets -- -D warnings     ok (also each branch alone: clippy -p horizon-client --all-targets)
cargo test -p horizon-client                              ok (628 lib + bins, 0 failed)
python3 tools/parity.py --changed origin/main             79 passed, 0 failed in 64.9 min

Needs Ludovic

Nothing.

🤖 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/297 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/leaves-option-remesh` --- ### 📝 Commits (1) - [`81b07d1`](https://github.com/horizon-rust/horizon/commit/81b07d1dd96c6773d07831a3aa62f90a0d610e30) Rebuild every section when a meshing option changes like vanilla ### 📊 Changes **2 files changed** (+17 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+16 -0) 📝 `crates/horizon-client/src/game/debug_keys.rs` (+1 -7) </details> ### 📄 Description Fixes #273 ## What Turning See-Through Leaves, Smooth Lighting or Biome Blend on or off now rebuilds every loaded section, like vanilla's `LevelExtractor.allChanged`. F3+A shares the same helper. ## Why In vanilla, `Options.cutoutLeaves`, `ambientOcclusion` and `biomeBlendRadius` all call `allChanged` when their value changes. Horizon only handed the new value to the mesher. After turning See-Through Leaves off, every loaded section kept its see-through leaves (pale against the sky), while sections rebuilt later (block updates, newly loaded chunks) got opaque leaves. That left the washed-out patches in view. The opaque-leaves rendering itself (solid layer, `dark_cutout` texture, foliage tint, `LeavesBlock.skipRendering`) already matched vanilla. ## How tested Before/after on the Mac mini (`--offscreen`, `horizon-ctl screenshot`): load with See-Through Leaves on, then turn it off from Graphics: Advanced. - Before: four leaf blocks in front of a red wool wall still show the red through their holes after the switch, and only the re-meshed trees turn opaque, so the view is a mix. - After: everything turns opaque at once. ## Self-check (Mac mini, all three fixes on main) ``` cargo fmt --all --check ok cargo clippy --workspace --all-targets -- -D warnings ok (also each branch alone: clippy -p horizon-client --all-targets) cargo test -p horizon-client ok (628 lib + bins, 0 failed) python3 tools/parity.py --changed origin/main 79 passed, 0 failed in 64.9 min ``` ## Needs Ludovic Nothing. 🤖 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-02 15:56:25 +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#2468
No description provided.