[PR #5742] [MERGED] Far terrain: a coarse backdrop fills the horizon while it loads, never beside the near chunks #6470

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5742
Author: @some-du6e
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/lod-near-detail


📝 Commits (3)

  • 9a4e65e Test that far terrain past the render distance loads fine first
  • 63eb8a3 Fill far terrain to the horizon with a coarse backdrop while it loads
  • 2c4c4f8 Merge main: the coarse backdrop in main's wanted queue

📊 Changes

1 file changed (+240 additions, -23 deletions)

View changed files

📝 crates/horizon-client-render/src/lod.rs (+240 -23)

📄 Description

Players saw the far terrain right past render distance 12 as big flat boxes with grey sides. The coarse far tiles stood in next to the real chunks while the fine ones loaded. Main already stops that by loading only the final tiles, nearest first. The catch is that the far terrain then ends in a hard edge with sky behind it until the very last tile is in, which took minutes on a slow machine.

This keeps main's seam and brings back an early horizon, without the boxes:

  • Load order (wanted_tiles, a class in main's Wanted heap):
    1. the planned tiles within 4 chunks past the render distance, nearest first;
    2. a coarse backdrop: each far tile's ancestor two levels up, or one up where two would reach the seam (about 230 tiles in Full, about 10% more sampling);
    3. everything else, nearest first, each replacing its part of the backdrop.
  • No stand-ins at the seam (Plan::stands_in): a split tile never draws for its missing children within 3 chunks of the render distance, which is 2 past the last near chunk. Both Plan::select and the incremental evaluate apply it, so the seam waits for its own tiles.

Measured

Unit tests that load a render-distance-12 view one job at a time, at three camera positions in Full and Reduced:

seam fully detailed horizon fully covered
main 270–301 jobs the last of ~3000 jobs (Full) / ~1050 (Reduced)
this PR unchanged, < 320 jobs, < 9000 lattice points (asserted) < 1000 jobs, < 100,000 lattice points (asserted)

In game, I filmed nightly 1da354b, main and this branch side by side on a GitHub runner (lavapipe, Xvfb, seed 1, above jagged peaks at -55 -1910, LOD Distance 64, Full). Stills and a video are in the lod-seam-compare artifact of https://github.com/some-du6e/horizon/actions/runs/41271366876:

  • 1 min: the nightly draws the horizon as blocky cliffs with grey sides. Main and this branch show only the fine ring next to the near chunks.
  • 2 min: this branch reaches the horizon in fine detail. Main still ends in a hard edge.
  • 6 min: main and this branch look the same. The nightly keeps blocky sea and snow patches.

Checks

On GitHub Actions (I didn't build locally), at this branch's head (run https://github.com/some-du6e/horizon/actions/runs/41274936476): cargo fmt -p horizon-client-render -- --check, cargo clippy -p horizon-client-render --lib --tests --locked -- -D warnings and cargo test -p horizon-client-render --lib --locked lod all pass, including incremental_selection_matches_plan_select_after_every_sample. I didn't run tools/pr_ready.py or the harnesses.

Note

Filed by Opus 5.5 using 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/5742 **Author:** [@some-du6e](https://github.com/some-du6e) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/lod-near-detail` --- ### 📝 Commits (3) - [`9a4e65e`](https://github.com/horizon-rust/horizon/commit/9a4e65ef6efd21050bc62c4833bb7f4e723ec2bc) Test that far terrain past the render distance loads fine first - [`63eb8a3`](https://github.com/horizon-rust/horizon/commit/63eb8a3b8c332b3893e57387ec3fe01a4c336778) Fill far terrain to the horizon with a coarse backdrop while it loads - [`2c4c4f8`](https://github.com/horizon-rust/horizon/commit/2c4c4f83d0bf60d0916d4c73032b7b846559ddcc) Merge main: the coarse backdrop in main's wanted queue ### 📊 Changes **1 file changed** (+240 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/lod.rs` (+240 -23) </details> ### 📄 Description Players saw the far terrain right past render distance 12 as big flat boxes with grey sides. The coarse far tiles stood in next to the real chunks while the fine ones loaded. Main already stops that by loading only the final tiles, nearest first. The catch is that the far terrain then ends in a hard edge with sky behind it until the very last tile is in, which took minutes on a slow machine. This keeps main's seam and brings back an early horizon, without the boxes: - **Load order** (`wanted_tiles`, a class in main's `Wanted` heap): 1. the planned tiles within 4 chunks past the render distance, nearest first; 2. a coarse backdrop: each far tile's ancestor two levels up, or one up where two would reach the seam (about 230 tiles in Full, about 10% more sampling); 3. everything else, nearest first, each replacing its part of the backdrop. - **No stand-ins at the seam** (`Plan::stands_in`): a split tile never draws for its missing children within 3 chunks of the render distance, which is 2 past the last near chunk. Both `Plan::select` and the incremental `evaluate` apply it, so the seam waits for its own tiles. ## Measured Unit tests that load a render-distance-12 view one job at a time, at three camera positions in Full and Reduced: | | seam fully detailed | horizon fully covered | |---|---|---| | main | 270–301 jobs | the last of ~3000 jobs (Full) / ~1050 (Reduced) | | this PR | unchanged, < 320 jobs, < 9000 lattice points (asserted) | < 1000 jobs, < 100,000 lattice points (asserted) | In game, I filmed nightly 1da354b, main and this branch side by side on a GitHub runner (lavapipe, Xvfb, seed 1, above jagged peaks at -55 -1910, LOD Distance 64, Full). Stills and a video are in the `lod-seam-compare` artifact of https://github.com/some-du6e/horizon/actions/runs/41271366876: - **1 min:** the nightly draws the horizon as blocky cliffs with grey sides. Main and this branch show only the fine ring next to the near chunks. - **2 min:** this branch reaches the horizon in fine detail. Main still ends in a hard edge. - **6 min:** main and this branch look the same. The nightly keeps blocky sea and snow patches. ## Checks On GitHub Actions (I didn't build locally), at this branch's head (run https://github.com/some-du6e/horizon/actions/runs/41274936476): `cargo fmt -p horizon-client-render -- --check`, `cargo clippy -p horizon-client-render --lib --tests --locked -- -D warnings` and `cargo test -p horizon-client-render --lib --locked lod` all pass, including `incremental_selection_matches_plan_select_after_every_sample`. I didn't run `tools/pr_ready.py` or the harnesses. > [!NOTE] > Filed by Opus 5.5 using 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 06:21:10 +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#6470
No description provided.