[PR #3850] [MERGED] Far terrain: no dark band in the sea where chunks were loaded #5249

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

📋 Pull Request Information

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

Base: main ← Head: fix/far-open-water-light


📝 Commits (1)

  • 96877dc Far terrain: no dark band in the sea where chunks were loaded

📊 Changes

1 file changed (+68 additions, -0 deletions)

View changed files

📝 crates/horizon-client-render/src/lod.rs (+68 -0)

📄 Description

🤖 Opened by Fauxvale's AI agent (Claude Code, Claude Opus 5.5), not by Fauxvale personally.

What players see

With LOD Distance on, sea you have already flown over is drawn darker than the rest of the far ocean: a dark band (or, on a server, a grid of dark squares) follows your path through the sea.

Why

Far terrain over the sea comes from two sources that light water differently:

  • The seed's far columns (vanillagen::lod: preview_column, columns) light every span as open sky (light: 240).
  • A loaded chunk's summary (Column::from_chunk) keeps the chunk's own light. That light fades a level per block of water, so the water is stored one span per block (Lf0, Le0, Ld0…), and the floor under it ends up nearly unlit.

Chunks you passed are summarized, so they draw darker than the seed's columns around them.

Change

Column::from_chunk now lights open water and its floor as open sky, as the seed does: Column::light_open_water, run before the surface is found. Spans under a solid top are left alone (caves, ice), lava is left alone, and block light is kept. The water merges back into one span, so a summarized sea also has fewer spans.

One file, +68 lines, including a unit test (open_water_and_its_floor_are_lit_as_the_seed_lights_them).

How it was found and checked

  • Single player, seed 42, LOD Distance 1024, Render Distance 12, spectator at y 179. I flew south over the ocean from (253, 224) to (253, 1700) and looked back from z 250: the flown strip was a darker band through the seed-lit sea.
  • The same bug shows up more sharply in a Fauxclient build (Horizon plus mods) on a server. Chunks there are sometimes summarized before their light arrives and come out fully lit, so the path becomes a checkerboard of dark squares. A dump of the far tiles showed the two kinds of summary side by side (62-63 Lf0, 61-62 Le0, … against 49-63 Lf0). The same change there removed the squares in game.
  • I haven't rebuilt and rechecked this exact branch in single player in game, only through the unit tests below.
  • #3025 (water at the full-detail edge) is a different seam: the side faces where far water meets full-detail chunks.
  • #3468 also edits lod.rs (heightmap far tiles), so the two may need a small merge.

Self-check

pr_ready (tools/pr_ready.py --quick on faux-cachy-lenovo, against origin/main at 7ebf7d26c, 4 min 42 s)

Check Result
Scope ✅ 1 files, +68 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 423 passed (47 s)
rustfmt ✅ (15 s)
clippy ❌ failed (2 min 2 s)
tests: horizon-client-render ✅ 551 passed (1 min 24 s)
doc tests ✅ 0 passed (14 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)

clippy fails on this machine's rustc 1.95.0 on code this PR doesn't touch, and it fails the same way on main at 7ebf7d26c: manual_range_contains in crates/horizon-client-render/src/camera.rs:676, plus 12 errors in horizon-world (worldgen/aquifer/noise_based.rs, datafix/chunk_flatten.rs). With --no-deps, horizon-client-render reports only the camera.rs error, none in lod.rs.

🤖 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/3850 **Author:** [@Fauxvale](https://github.com/Fauxvale) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/far-open-water-light` --- ### 📝 Commits (1) - [`96877dc`](https://github.com/horizon-rust/horizon/commit/96877dcf48ba1fd266c7efea20f014c1bdfab6bc) Far terrain: no dark band in the sea where chunks were loaded ### 📊 Changes **1 file changed** (+68 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/lod.rs` (+68 -0) </details> ### 📄 Description > 🤖 Opened by Fauxvale's AI agent (Claude Code, Claude Opus 5.5), not by Fauxvale personally. ## What players see With LOD Distance on, sea you have already flown over is drawn darker than the rest of the far ocean: a dark band (or, on a server, a grid of dark squares) follows your path through the sea. ## Why Far terrain over the sea comes from two sources that light water differently: - The seed's far columns (`vanillagen::lod`: `preview_column`, `columns`) light every span as open sky (`light: 240`). - A loaded chunk's summary (`Column::from_chunk`) keeps the chunk's own light. That light fades a level per block of water, so the water is stored one span per block (`Lf0`, `Le0`, `Ld0`…), and the floor under it ends up nearly unlit. Chunks you passed are summarized, so they draw darker than the seed's columns around them. ## Change `Column::from_chunk` now lights open water and its floor as open sky, as the seed does: `Column::light_open_water`, run before the surface is found. Spans under a solid top are left alone (caves, ice), lava is left alone, and block light is kept. The water merges back into one span, so a summarized sea also has fewer spans. One file, +68 lines, including a unit test (`open_water_and_its_floor_are_lit_as_the_seed_lights_them`). ## How it was found and checked - Single player, seed 42, LOD Distance 1024, Render Distance 12, spectator at y 179. I flew south over the ocean from (253, 224) to (253, 1700) and looked back from z 250: the flown strip was a darker band through the seed-lit sea. - The same bug shows up more sharply in a Fauxclient build (Horizon plus mods) on a server. Chunks there are sometimes summarized before their light arrives and come out fully lit, so the path becomes a checkerboard of dark squares. A dump of the far tiles showed the two kinds of summary side by side (`62-63 Lf0, 61-62 Le0, …` against `49-63 Lf0`). The same change there removed the squares in game. - I haven't rebuilt and rechecked this exact branch in single player in game, only through the unit tests below. ## Related - #3025 (water at the full-detail edge) is a different seam: the side faces where far water meets full-detail chunks. - #3468 also edits `lod.rs` (heightmap far tiles), so the two may need a small merge. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on faux-cachy-lenovo, against origin/main at 7ebf7d26c, 4 min 42 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +68 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 423 passed (47 s) | | rustfmt | ✅ (15 s) | | clippy | ❌ failed (2 min 2 s) | | tests: horizon-client-render | ✅ 551 passed (1 min 24 s) | | doc tests | ✅ 0 passed (14 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) | clippy fails on this machine's rustc 1.95.0 on code this PR doesn't touch, and it fails the same way on `main` at 7ebf7d26c: `manual_range_contains` in `crates/horizon-client-render/src/camera.rs:676`, plus 12 errors in `horizon-world` (`worldgen/aquifer/noise_based.rs`, `datafix/chunk_flatten.rs`). With `--no-deps`, `horizon-client-render` reports only the `camera.rs` error, none in `lod.rs`. 🤖 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:11:15 +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#5249
No description provided.