[PR #3765] [MERGED] far terrain: chunks past a shrunk render distance stay drawn until their tiles are ready #5203

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3765
Author: @iLostName
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

Base: main ← Head: far-terrain-render-distance-drop


📝 Commits (1)

  • d81f99b far terrain: chunks past a shrunk render distance stay drawn until their tiles are ready

📊 Changes

2 files changed (+127 additions, -26 deletions)

View changed files

📝 crates/horizon-client-render/src/lod.rs (+126 -25)
📝 docs/graphics.md (+1 -1)

📄 Description

What and why

Lowering the render distance with LOD Distance on (the Performance preset after playing at 32 or 64) showed flat, blocky plateaus with grey stone walls next to the near terrain for a minute or more, where the world is forest and plains. Far terrain samples no tiles inside the full-detail area (its level-0 tiles are empty stand-ins), so after the drop the tiles planned for the ring the chunks just left had never been sampled: Plan::select drew the coarsest ready ancestor, the root with 64-block cells at LOD 64 (its is_covered seals are the grey walls), while the next mesh job's cutout released the real chunk meshes at once.

Now the columns that leave the full-detail area stay left out (Lod::retiring), so their chunk meshes keep drawing, until the tile planned over each is ready (Plan::replaces; a level-0 tile also needs the chunk's summary or detail). In-view tiles are sampled first, so the view goes straight from the chunks to their final tiles. Detail requests treat retiring chunks as uncovered, so their tiles get the real blocks. Walking, teleporting and raising the render distance are unaffected: those columns are released at the next select.

Measurements

Copy of the reporter's world, camera at -784 140 602, render distance 64 → 8 with LOD 64, far detail full, RTX 3070:

  • Before: plateaus with stone walls appear within 5–30 s and stay 1–3 min in view; the real chunk meshes go within ~5 s.
  • After: the real terrain stays until replaced; in-view chunks are replaced within ~3 min, all within ~7 min (resident sections 105k → 3042, the same final count as before). FPS was the same in both runs, and memory never goes above what the higher distance used.
  • Starting directly at RD 8 + LOD 64 looks the same before and after. A unit test covers the release rule (a_shrunk_render_distance_keeps_columns_until_their_planned_tiles_are_ready).

Self-check

pr_ready (tools/pr_ready.py --quick on PC-Lost, against origin/main at 64990cd32, 3 min 39 s)

Check Result
Scope ✅ 2 files, +127 −26
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 408 run, FAILED (failures=1, skipped=12) (1 min 20 s)
rustfmt ✅ (12 s)
clippy ✅ (1 min 25 s)
tests: horizon-client-render ✅ 498 passed (19 s)
doc tests ✅ 0 passed (20 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)

The one failure under Python tests is test_port_publish.PublishTests.test_body_has_names_and_signatures_only, a ~/ against ~\ path check that fails on Windows on main too. Parity is left to CI.


🔄 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/3765 **Author:** [@iLostName](https://github.com/iLostName) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `far-terrain-render-distance-drop` --- ### 📝 Commits (1) - [`d81f99b`](https://github.com/horizon-rust/horizon/commit/d81f99ba8f9580dc8f28c0cbefdff7825f8fb18a) far terrain: chunks past a shrunk render distance stay drawn until their tiles are ready ### 📊 Changes **2 files changed** (+127 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/lod.rs` (+126 -25) 📝 `docs/graphics.md` (+1 -1) </details> ### 📄 Description ## What and why Lowering the render distance with LOD Distance on (the Performance preset after playing at 32 or 64) showed flat, blocky plateaus with grey stone walls next to the near terrain for a minute or more, where the world is forest and plains. Far terrain samples no tiles inside the full-detail area (its level-0 tiles are empty stand-ins), so after the drop the tiles planned for the ring the chunks just left had never been sampled: `Plan::select` drew the coarsest ready ancestor, the root with 64-block cells at LOD 64 (its `is_covered` seals are the grey walls), while the next mesh job's cutout released the real chunk meshes at once. Now the columns that leave the full-detail area stay left out (`Lod::retiring`), so their chunk meshes keep drawing, until the tile planned over each is ready (`Plan::replaces`; a level-0 tile also needs the chunk's summary or detail). In-view tiles are sampled first, so the view goes straight from the chunks to their final tiles. Detail requests treat retiring chunks as uncovered, so their tiles get the real blocks. Walking, teleporting and raising the render distance are unaffected: those columns are released at the next select. ## Measurements Copy of the reporter's world, camera at -784 140 602, render distance 64 → 8 with LOD 64, far detail full, RTX 3070: - Before: plateaus with stone walls appear within 5–30 s and stay 1–3 min in view; the real chunk meshes go within ~5 s. - After: the real terrain stays until replaced; in-view chunks are replaced within ~3 min, all within ~7 min (resident sections 105k → 3042, the same final count as before). FPS was the same in both runs, and memory never goes above what the higher distance used. - Starting directly at RD 8 + LOD 64 looks the same before and after. A unit test covers the release rule (`a_shrunk_render_distance_keeps_columns_until_their_planned_tiles_are_ready`). ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on PC-Lost, against origin/main at 64990cd32, 3 min 39 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +127 −26 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 408 run, FAILED (failures=1, skipped=12) (1 min 20 s) | | rustfmt | ✅ (12 s) | | clippy | ✅ (1 min 25 s) | | tests: horizon-client-render | ✅ 498 passed (19 s) | | doc tests | ✅ 0 passed (20 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) | The one failure under Python tests is `test_port_publish.PublishTests.test_body_has_names_and_signatures_only`, a `~/` against `~\` path check that fails on Windows on main too. Parity is left to CI. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:10:56 +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#5203
No description provided.