[PR #7625] [MERGED] LOD: light saved far columns' open water as open sky #7725

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

📋 Pull Request Information

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

Base: main ← Head: fix/lod-saved-open-water-light


📝 Commits (1)

  • b4629e0 fix(lod): light saved far columns' open water as open sky

📊 Changes

2 files changed (+40 additions, -3 deletions)

View changed files

📝 crates/horizon-client-render/src/lod.rs (+11 -3)
📝 crates/horizon-client/src/save.rs (+29 -0)

📄 Description

🤖 Opened by itarqos5's AI agent (Claude Opus 5), not by itarqos5 personally.

Part of #6380.

A saved chunk's LOD columns kept each water block's own skylight, which fades a level per block of water, while the generator's far columns light open water as open sky. Where the two meet — the stride limit in SavedLodSampler::grid — the difference draws a dark band through the sea. This is the case Column::light_open_water's own doc comment already describes: "the chunks a player passed drew a darker band through the seed's sea".

The live path (Column::from_chunk) applies that rule. decode_lod_surfaces never did.

What changed

  • Column::light_open_water_where takes the caller's own test for water; light_open_water(kinds) delegates to it. The decoder has no BlockFacts, so it cannot reach state_kinds.
  • decode_lod_surfaces applies it after spans.reverse(), naming water from the block registry, which leaves lava out as the emissive test did.
  • Gated on the decoder's existing sky_light, so the Nether's water gains no skylight it never had.

Coverage

saved_far_surface_reads_builds_and_water_without_gameplay_chunks already places open water; it now asserts every saved water span reads light & 0xf0 == 0xf0. It fails without the change.

The first version of this patch was not gated on sky_light and broke no invented skylight in Nether saves, which is what led to the gate.

Checks

Not a full tools/pr_ready.py run — stating exactly what was and was not done rather than implying a green block:

  • cargo test -p horizon-client-lib --lib -- save:: lod:: — 64 passed, 0 failed, 4 ignored
  • cargo check --profile fast -p horizon-client — clean
  • tools/pr_ready.py --quick reached clippy and failed with 12 clippy::manual_range_contains errors in horizon-world (worldgen/aquifer/noise_based.rs, datafix/schema.rs) — files this branch does not touch. This machine runs nightly 1.96; the repo targets stable 1.90+ and pins no toolchain, so these look like newer lints on pre-existing code rather than anything from this change. Worth a maintainer confirming on CI's stable.
  • The vanilla harnesses were not run here.

Scope

This fixes the dark band only. The same screenshots on #6380 also show dithered stippling across the water surface, which looks like coincident surfaces fighting for depth — a separate fault, not addressed here, so #6380 should stay open.

🤖 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/7625 **Author:** [@itarqos5](https://github.com/itarqos5) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/lod-saved-open-water-light` --- ### 📝 Commits (1) - [`b4629e0`](https://github.com/horizon-rust/horizon/commit/b4629e064fde266601eb17b0837adc009ce42cbc) fix(lod): light saved far columns' open water as open sky ### 📊 Changes **2 files changed** (+40 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/lod.rs` (+11 -3) 📝 `crates/horizon-client/src/save.rs` (+29 -0) </details> ### 📄 Description > 🤖 Opened by itarqos5's AI agent (Claude Opus 5), not by itarqos5 personally. Part of #6380. A saved chunk's LOD columns kept each water block's own skylight, which fades a level per block of water, while the generator's far columns light open water as open sky. Where the two meet — the stride limit in `SavedLodSampler::grid` — the difference draws a dark band through the sea. This is the case `Column::light_open_water`'s own doc comment already describes: *"the chunks a player passed drew a darker band through the seed's sea"*. The live path (`Column::from_chunk`) applies that rule. `decode_lod_surfaces` never did. ## What changed - `Column::light_open_water_where` takes the caller's own test for water; `light_open_water(kinds)` delegates to it. The decoder has no `BlockFacts`, so it cannot reach `state_kinds`. - `decode_lod_surfaces` applies it after `spans.reverse()`, naming water from the block registry, which leaves lava out as the emissive test did. - Gated on the decoder's existing `sky_light`, so the Nether's water gains no skylight it never had. ## Coverage `saved_far_surface_reads_builds_and_water_without_gameplay_chunks` already places open water; it now asserts every saved water span reads `light & 0xf0 == 0xf0`. It fails without the change. The first version of this patch was not gated on `sky_light` and broke `no invented skylight in Nether saves`, which is what led to the gate. ## Checks Not a full `tools/pr_ready.py` run — stating exactly what was and was not done rather than implying a green block: - `cargo test -p horizon-client-lib --lib -- save:: lod::` — **64 passed, 0 failed, 4 ignored** - `cargo check --profile fast -p horizon-client` — clean - `tools/pr_ready.py --quick` reached clippy and **failed with 12 `clippy::manual_range_contains` errors in `horizon-world`** (`worldgen/aquifer/noise_based.rs`, `datafix/schema.rs`) — files this branch does not touch. This machine runs nightly 1.96; the repo targets stable 1.90+ and pins no toolchain, so these look like newer lints on pre-existing code rather than anything from this change. Worth a maintainer confirming on CI's stable. - The vanilla harnesses were not run here. ## Scope This fixes the dark band only. The same screenshots on #6380 also show dithered stippling across the water surface, which looks like coincident surfaces fighting for depth — a separate fault, not addressed here, so #6380 should stay open. 🤖 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 07:23:06 +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#7725
No description provided.