[PR #992] [MERGED] Far terrain: no dark band at the full-detail edge, no black cliffs #2969

Closed
opened 2026-11-02 16:00:30 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/lod-visual-bugs


📝 Commits (1)

  • bf8d849 Far terrain: no dark band at the full-detail edge, no black cliffs

📊 Changes

6 files changed (+167 additions, -37 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+3 -0)
📝 crates/horizon-client/src/gfx.rs (+21 -1)
📝 crates/horizon-client/src/gfx/lod.rs (+17 -0)
📝 crates/horizon-client/src/gfx/resident.rs (+30 -10)
📝 crates/horizon-client/src/lod.rs (+19 -1)
📝 crates/horizon-client/src/lod/mesh.rs (+77 -25)

📄 Description

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

Follow-up to @Online5277's terrain LODs (#771): two visual bugs that were already in the original build. Nothing for the contributor to redo. First of a stack of four (this one, then #993, #994, #995).

The dark band along the edge of full-detail terrain

Full-detail sections that left the render distance stopped being drawn straight away, but the far tiles kept leaving those columns out until their next mesh job finished. For a few seconds after moving (longer on slow machines) a hole opened there. It was lined with the tiles' seal walls, which took the light recorded for buried blocks (none), so the hole showed as a dark band.

Lod::take_cutout now gives the renderer the columns the finished meshes leave out. Their resident sections stay drawn, even past the render distance. Sections unloaded while still left out are released only once the tiles cover them. With LODs off the cutout is empty: remove releases at once, as on main, and Resident::visible checks only an empty set.

Black cliff faces in the distance

A tile's side faces took the light of the block they were cut from, so a face buried in its own column but open to the air beside it was painted at sky light 0 and drew black. Side faces above the top of the column they face now take the sky light of whichever is brighter, that column's top or their own. Block light is unchanged.

Proof (Mac mini M4 Pro, seed 1234, RD 12, LOD 64)

Screenshots are in ~/code/horizon-parity/shots/perf-frame-9/ (private repo):

  • mv-base-grid.png vs mv-a1b-grid.png: overview until covered, then go to the peak view and back, and capture 0.5/2/5/15/40 s later while the near terrain reloads. Before: a dark band follows the full-detail edge until the tiles catch up. After: no band at any of those times.
  • at-cmp-a1.png (top = #771, bottom = this PR): the black cliffs and holes on the hills are gone. crop-cliffs.png / crop-edge.png are zoomed crops.

With LODs off nothing changes. The trio and FPS for the whole stack are in #995: main / stack / main, identical except for streaming noise at the fog edge.

Self-check

cargo fmt --all --check                                    ok
cargo clippy --workspace --all-targets -- -D warnings      ok
cargo test -p horizon-client --lib                         924 passed, 13 ignored
  lod ignored tests with resources: real_mesh_clips_near_chunks_… ok
tools/parity.py --changed origin/main                      98 passed, 0 failed (run on the whole stack)

New test: exposed_buried_sides_take_the_sky_light_over_their_neighbor.

Kira: card#23.

🤖 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/992 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/19/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/lod-visual-bugs` --- ### 📝 Commits (1) - [`bf8d849`](https://github.com/horizon-rust/horizon/commit/bf8d84930fe5675d4bb667220d48a1d347c13715) Far terrain: no dark band at the full-detail edge, no black cliffs ### 📊 Changes **6 files changed** (+167 additions, -37 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+3 -0) 📝 `crates/horizon-client/src/gfx.rs` (+21 -1) 📝 `crates/horizon-client/src/gfx/lod.rs` (+17 -0) 📝 `crates/horizon-client/src/gfx/resident.rs` (+30 -10) 📝 `crates/horizon-client/src/lod.rs` (+19 -1) 📝 `crates/horizon-client/src/lod/mesh.rs` (+77 -25) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Follow-up to @Online5277's terrain LODs (#771): two visual bugs that were already in the original build. Nothing for the contributor to redo. First of a stack of four (this one, then #993, #994, #995). ## The dark band along the edge of full-detail terrain Full-detail sections that left the render distance stopped being drawn straight away, but the far tiles kept leaving those columns out until their next mesh job finished. For a few seconds after moving (longer on slow machines) a hole opened there. It was lined with the tiles' seal walls, which took the light recorded for buried blocks (none), so the hole showed as a dark band. `Lod::take_cutout` now gives the renderer the columns the finished meshes leave out. Their resident sections stay drawn, even past the render distance. Sections unloaded while still left out are released only once the tiles cover them. With LODs off the cutout is empty: `remove` releases at once, as on main, and `Resident::visible` checks only an empty set. ## Black cliff faces in the distance A tile's side faces took the light of the block they were cut from, so a face buried in its own column but open to the air beside it was painted at sky light 0 and drew black. Side faces above the top of the column they face now take the sky light of whichever is brighter, that column's top or their own. Block light is unchanged. ## Proof (Mac mini M4 Pro, seed 1234, RD 12, LOD 64) Screenshots are in `~/code/horizon-parity/shots/perf-frame-9/` (private repo): - `mv-base-grid.png` vs `mv-a1b-grid.png`: overview until covered, then go to the peak view and back, and capture 0.5/2/5/15/40 s later while the near terrain reloads. Before: a dark band follows the full-detail edge until the tiles catch up. After: no band at any of those times. - `at-cmp-a1.png` (top = #771, bottom = this PR): the black cliffs and holes on the hills are gone. `crop-cliffs.png` / `crop-edge.png` are zoomed crops. With LODs off nothing changes. The trio and FPS for the whole stack are in #995: main / stack / main, identical except for streaming noise at the fog edge. ## Self-check ``` cargo fmt --all --check ok cargo clippy --workspace --all-targets -- -D warnings ok cargo test -p horizon-client --lib 924 passed, 13 ignored lod ignored tests with resources: real_mesh_clips_near_chunks_… ok tools/parity.py --changed origin/main 98 passed, 0 failed (run on the whole stack) ``` New test: `exposed_buried_sides_take_the_sky_light_over_their_neighbor`. Kira: card#23. 🤖 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 16:00:30 +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#2969
No description provided.