[PR #4158] [MERGED] Far terrain: shaded water and canopies, swamp grass, no floor pillars or water walls #5449

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4158
Author: @spidercraft
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @rdbtCVS

Base: main ← Head: far-terrain-look


📝 Commits (4)

  • 2e321e3 Far terrain: decorated chunks kept on disk, read again next session
  • 8922550 Far terrain cache: a chunk cached already is not written again
  • fb9db82 Far terrain: real chunks out to level 2 on idle threads, loading outward from the player
  • ee7d443 Far terrain: shaded water and canopies, swamp grass, no floor pillars or water walls

📊 Changes

7 files changed (+836 additions, -257 deletions)

View changed files

📝 crates/horizon-client-render/src/lod.rs (+109 -156)
➕ crates/horizon-client-render/src/lod/cache.rs (+356 -0)
📝 crates/horizon-client-render/src/lod/mesh.rs (+198 -65)
📝 crates/horizon-client-render/src/mesher.rs (+9 -0)
📝 crates/horizon-client/src/game.rs (+0 -1)
📝 crates/horizon-client/src/save.rs (+41 -7)
📝 crates/horizon-client/src/vanillagen/lod.rs (+123 -28)

📄 Description

🤖 Opened by Claude Code.

Far terrain, part 3 of 4. This PR: light, water and forests. Built on #4157 (part 2, which contains #4156, part 1: merge them first; review this PR's own commit). Next: #4159 (fades).

What and why

Things that looked wrong in far terrain, each found in game and compared against vanilla at the same spot:

  • Bright sea beds, white dots across the sea. Generated far chunks lit every block at full skylight, so the bed of a sea was lit as if in the open. Skylight now goes straight down each generated column: water and leaves take a level a block, one span per level as a real chunk stores light (shade_sky, vanillagen/lod.rs). One water span lit 15 to the bottom also let coarse cells merging water and sand (Column::reduced) give the sand that light: the white dots. Solid blocks pass the light on: under them far terrain shows cliffs and overhangs, which vanilla lights sideways (stopping it there turned them black). A ponytail: note marks the straight-down simplification.
  • Kelp and seagrass in saved and generated chunks are the water they hold (#4144 does the same for loaded chunks; this PR leaves lod::summarize to it).
  • Swamp grass. Far grass took the biome's flat grass colour; it now takes vanilla's at each cell (Biomes::grass, with the swamp and dark forest modifiers).
  • Pillars of the floor block under forests. Far meshing fills air gaps no open air reaches (fill_buried_gaps), judged by the four neighbours' heights: under a canopy every neighbour is as tall, so the air below the leaves was filled up to them. A gap is now open when open air reaches it through neighbouring gaps (a flood fill). Seed 1234 at LOD Distance 512: 9.27M far quads become 11.22M, the trunks and forest floor that were missing.
  • A light wall in the water where far terrain begins. Far tiles seal their side where near terrain begins; through near water the seal showed. It is now opaque only (near water carries on into far water).
  • A light sheet in the water at the edge of the loaded chunks. A section beside a chunk not loaded meshed against lit air there, so the outermost chunks' water drew a wall toward it (fluids show both sides). It now meshes against its own edge column (Padded::new, mesher.rs): this touches the near mesher every player uses, so its parity harnesses are CI's to confirm.

Tests

New tests: generated columns are lit 15 on top and shaded below a canopy (real data, HORIZON_TEST_RESOURCES); air under a canopy stays open through one clearing while a sealed two-column cave is still filled. pr_ready on the top of this stack (#4159, which contains this PR):

pr_ready (tools/pr_ready.py --quick on SpiderPC, against origin/main at 25f9cd3a9, 2 min 15 s)

Check Result
Scope ⚠️ 12 files, +1175 −295; 1470 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 480 passed (26 s)
rustfmt ✅ (5 s)
clippy ✅ (1 min 0 s)
tests: horizon-client, horizon-client-render ✅ 1527 passed (43 s)
doc tests ✅ 0 passed (2 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)

🤖 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/4158 **Author:** [@spidercraft](https://github.com/spidercraft) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `far-terrain-look` --- ### 📝 Commits (4) - [`2e321e3`](https://github.com/horizon-rust/horizon/commit/2e321e385a769bcaaff350c4fb194c89eefbfd1a) Far terrain: decorated chunks kept on disk, read again next session - [`8922550`](https://github.com/horizon-rust/horizon/commit/8922550fdf258558b0a03609772168ce8c5fe6d6) Far terrain cache: a chunk cached already is not written again - [`fb9db82`](https://github.com/horizon-rust/horizon/commit/fb9db82d1b32968e3ab419498cefefe39c733a2f) Far terrain: real chunks out to level 2 on idle threads, loading outward from the player - [`ee7d443`](https://github.com/horizon-rust/horizon/commit/ee7d443c8f0f4c56d10882cde7d6e330e00b6278) Far terrain: shaded water and canopies, swamp grass, no floor pillars or water walls ### 📊 Changes **7 files changed** (+836 additions, -257 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/lod.rs` (+109 -156) ➕ `crates/horizon-client-render/src/lod/cache.rs` (+356 -0) 📝 `crates/horizon-client-render/src/lod/mesh.rs` (+198 -65) 📝 `crates/horizon-client-render/src/mesher.rs` (+9 -0) 📝 `crates/horizon-client/src/game.rs` (+0 -1) 📝 `crates/horizon-client/src/save.rs` (+41 -7) 📝 `crates/horizon-client/src/vanillagen/lod.rs` (+123 -28) </details> ### 📄 Description > 🤖 Opened by Claude Code. **Far terrain, part 3 of 4.** This PR: light, water and forests. Built on #4157 (part 2, which contains #4156, part 1: merge them first; review this PR's own commit). Next: #4159 (fades). ## What and why Things that looked wrong in far terrain, each found in game and compared against vanilla at the same spot: - **Bright sea beds, white dots across the sea.** Generated far chunks lit every block at full skylight, so the bed of a sea was lit as if in the open. Skylight now goes straight down each generated column: water and leaves take a level a block, one span per level as a real chunk stores light (`shade_sky`, `vanillagen/lod.rs`). One water span lit 15 to the bottom also let coarse cells merging water and sand (`Column::reduced`) give the sand that light: the white dots. Solid blocks pass the light on: under them far terrain shows cliffs and overhangs, which vanilla lights sideways (stopping it there turned them black). A `ponytail:` note marks the straight-down simplification. - **Kelp and seagrass** in saved and generated chunks are the water they hold (#4144 does the same for loaded chunks; this PR leaves `lod::summarize` to it). - **Swamp grass.** Far grass took the biome's flat grass colour; it now takes vanilla's at each cell (`Biomes::grass`, with the swamp and dark forest modifiers). - **Pillars of the floor block under forests.** Far meshing fills air gaps no open air reaches (`fill_buried_gaps`), judged by the four neighbours' heights: under a canopy every neighbour is as tall, so the air below the leaves was filled up to them. A gap is now open when open air reaches it through neighbouring gaps (a flood fill). Seed 1234 at LOD Distance 512: 9.27M far quads become 11.22M, the trunks and forest floor that were missing. - **A light wall in the water where far terrain begins.** Far tiles seal their side where near terrain begins; through near water the seal showed. It is now opaque only (near water carries on into far water). - **A light sheet in the water at the edge of the loaded chunks.** A section beside a chunk not loaded meshed against lit air there, so the outermost chunks' water drew a wall toward it (fluids show both sides). It now meshes against its own edge column (`Padded::new`, `mesher.rs`): this touches the near mesher every player uses, so its parity harnesses are CI's to confirm. ## Tests New tests: generated columns are lit 15 on top and shaded below a canopy (real data, `HORIZON_TEST_RESOURCES`); air under a canopy stays open through one clearing while a sealed two-column cave is still filled. pr_ready on the top of this stack (#4159, which contains this PR): **pr_ready** (`tools/pr_ready.py --quick` on SpiderPC, against origin/main at 25f9cd3a9, 2 min 15 s) | Check | Result | | --- | --- | | Scope | ⚠️ 12 files, +1175 −295; 1470 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 480 passed (26 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (1 min 0 s) | | tests: horizon-client, horizon-client-render | ✅ 1527 passed (43 s) | | doc tests | ✅ 0 passed (2 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) | 🤖 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:12:39 +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#5449
No description provided.