[PR #6327] [MERGED] Far terrain on servers without horizon:lod (5/5): no rings of nothing, slabs or holes #6797

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

📋 Pull Request Information

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

Base: main ← Head: far-terrain/4-gaps


📝 Commits (5)

  • c0c6fa6 Server far terrain: no slab of one chunk over a cell it barely covers
  • 9df7144 Far terrain: sample again the tiles a server chunk was kept too late for
  • 497db27 Far terrain: a sample still waiting for BlueMap's data isn't drawn
  • 3acfde7 Far terrain: BlueMap's coarser levels stand in while the finest loads
  • 115443b Merge main into #6327

📊 Changes

8 files changed (+972 additions, -59 deletions)

View changed files

📝 crates/horizon-client-render/src/bluemap.rs (+165 -23)
📝 crates/horizon-client-render/src/gfx/lod.rs (+24 -4)
📝 crates/horizon-client-render/src/lod.rs (+633 -13)
📝 crates/horizon-client-render/src/server_terrain.rs (+124 -17)
📝 crates/horizon-client-render/src/streaming.rs (+12 -0)
📝 crates/horizon-client/src/game.rs (+8 -1)
📝 crates/horizon-client/src/game/remote.rs (+5 -0)
📝 docs/graphics.md (+1 -1)

📄 Description

Fixes the far-terrain gaps that showed up once all of the above ran on a real server: rings of nothing, slabs and holes.

This PR: c0c6fa6b1, 9df7144bd, 497db2791, 3acfde75b

  • No slab of one chunk drawn over a cell it barely covers. A wide cell is drawn from kept chunks only when at least half of it was kept.
  • Re-sampling cells a chunk was kept too late for. Wide cells sampled before the server sent a chunk under them are sampled again (resample_over, through LodSource::keeps_observed).
  • No ring of nothing past the near chunks while BlueMap loads.
    • A sample with a hole, meaning data still on its way and nothing coarser to stand in, is thrown away. What it would replace stays drawn.
    • That tile waits in Ludovic's retry map for 10 s, or is sampled again as soon as the data comes.
    • Finer tiles upload first.
    • On a server, the finest tiles stop where it stops sending chunks.
  • BlueMap's coarser levels stand in while the finest loads, and also, column by column, where the finest level's tile is out of download reach. A void at a coarser level is drawn as void, not counted as a hole.

Tests, without resources: a waited sample is retried when its data comes; a tile refreshed mid-sample is sampled once more; identical samples mesh nothing; kept chunks re-sample the wide tiles over them; holes are waited for and stood-in cells are drawn. Also the wide-cell rule. With prepared resources (#[ignore]):

  • A player flying past 1800 chunks keeps every dropped one drawn.
  • 32 × 32 chunks kept after their far tiles were sampled fill in.
  • a scheduler scenario with a source that stands in coarse columns keeps 2024 chunks past the near terrain drawn while the finest level downloads.

The stack

This follows #4945–#4947, Ludovic's horizon:lod stack, which is now merged. That stack covers Horizon servers that sample far terrain for their clients. This one covers every other server: vanilla, Paper and Spigot never send their seed, so far terrain had nothing to draw there. prepare_lod tries the integrated server first, then the server's horizon:lod offer, and only falls back to this stack when there is no offer. Status reports this fallback as lod.source: "server-terrain", so the two can be told apart.

Each PR targets main and holds the PRs before it, so review only the commits listed under "This PR". Merge them in order.

  1. #6323: keep the chunks a server sent
  2. #6324: BlueMap's lowres tiles, settings and palette
  3. #6325: draw the rest from the server's BlueMap
  4. #6326: Find BlueMap, and no re-mesh storms
  5. #6327 (this one): no rings of nothing, slabs or holes
  6. #6643: read Bobby's cache too, written from its files on disk

Other projects' code

None.

Checked

  • CI on the fork (run): clippy --all-targets -D warnings on horizon-client-render, horizon-client and horizon-mods and the render crate's tests at every one of the 9 commits, and cargo fmt --check, the horizon-client tests and horizon-mods' modpack tests on the top one.

  • Live test on GitHub Actions (run). The runner downloads the pinned 26.3 from Mojang (every file checked against Mojang's SHA-1) and runs horizon-prepare. Then:

    • It records a local world drawing a real server's BlueMap as far terrain (video, recorded on these exact commits).

    Far terrain from a server's BlueMap

    • It runs tools/server_lod_e2e.py against a real dedicated server. With horizon-lod-distance set it reports source: server. Without it, it reports source: server-terrain (updated in PR 1).
  • Review: 16 rounds of independent reviewers, the last with no real findings (correctness, edge cases, tests, simplicity, fit) over the whole stack. Each finding went into the commit it belongs to. Since then, the .bobby reader came out and the stack was rebased on main; CI above is on the result.

  • Not run: the parity harnesses, and pr_ready.py (it needs .local/, which this machine doesn't build).

Suggested labels, since this fork can't set them: feature and needs-proof.

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/6327 **Author:** [@some-du6e](https://github.com/some-du6e) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `far-terrain/4-gaps` --- ### 📝 Commits (5) - [`c0c6fa6`](https://github.com/horizon-rust/horizon/commit/c0c6fa6b1776c209f5c60d0fff2f44ec95bd6e43) Server far terrain: no slab of one chunk over a cell it barely covers - [`9df7144`](https://github.com/horizon-rust/horizon/commit/9df7144bde3f72f9df6ac23f25878f81ddb6c245) Far terrain: sample again the tiles a server chunk was kept too late for - [`497db27`](https://github.com/horizon-rust/horizon/commit/497db27914ce5e37a59dd6d6de89c7ce5d95da91) Far terrain: a sample still waiting for BlueMap's data isn't drawn - [`3acfde7`](https://github.com/horizon-rust/horizon/commit/3acfde75ba69a52c207861728a59060d5bf36967) Far terrain: BlueMap's coarser levels stand in while the finest loads - [`115443b`](https://github.com/horizon-rust/horizon/commit/115443b7a738f47d2fab5700550551d40e805b70) Merge main into #6327 ### 📊 Changes **8 files changed** (+972 additions, -59 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/bluemap.rs` (+165 -23) 📝 `crates/horizon-client-render/src/gfx/lod.rs` (+24 -4) 📝 `crates/horizon-client-render/src/lod.rs` (+633 -13) 📝 `crates/horizon-client-render/src/server_terrain.rs` (+124 -17) 📝 `crates/horizon-client-render/src/streaming.rs` (+12 -0) 📝 `crates/horizon-client/src/game.rs` (+8 -1) 📝 `crates/horizon-client/src/game/remote.rs` (+5 -0) 📝 `docs/graphics.md` (+1 -1) </details> ### 📄 Description Fixes the far-terrain gaps that showed up once all of the above ran on a real server: rings of nothing, slabs and holes. ## This PR: `c0c6fa6b1`, `9df7144bd`, `497db2791`, `3acfde75b` - **No slab of one chunk drawn over a cell it barely covers.** A wide cell is drawn from kept chunks only when at least half of it was kept. - **Re-sampling cells a chunk was kept too late for.** Wide cells sampled before the server sent a chunk under them are sampled again (`resample_over`, through `LodSource::keeps_observed`). - **No ring of nothing past the near chunks while BlueMap loads.** - A sample with a hole, meaning data still on its way and nothing coarser to stand in, is thrown away. What it would replace stays drawn. - That tile waits in Ludovic's `retry` map for 10 s, or is sampled again as soon as the data comes. - Finer tiles upload first. - On a server, the finest tiles stop where it stops sending chunks. - **BlueMap's coarser levels stand in while the finest loads,** and also, column by column, where the finest level's tile is out of download reach. A void at a coarser level is drawn as void, not counted as a hole. Tests, without resources: a waited sample is retried when its data comes; a tile refreshed mid-sample is sampled once more; identical samples mesh nothing; kept chunks re-sample the wide tiles over them; holes are waited for and stood-in cells are drawn. Also the wide-cell rule. With prepared resources (`#[ignore]`): - A player flying past 1800 chunks keeps every dropped one drawn. - 32 × 32 chunks kept after their far tiles were sampled fill in. - a scheduler scenario with a source that stands in coarse columns keeps 2024 chunks past the near terrain drawn while the finest level downloads. ## The stack This follows #4945–#4947, Ludovic's `horizon:lod` stack, which is now merged. That stack covers Horizon servers that sample far terrain for their clients. This one covers every other server: vanilla, Paper and Spigot never send their seed, so far terrain had nothing to draw there. `prepare_lod` tries the integrated server first, then the server's `horizon:lod` offer, and only falls back to this stack when there is no offer. Status reports this fallback as `lod.source: "server-terrain"`, so the two can be told apart. Each PR targets `main` and holds the PRs before it, so review only the commits listed under "This PR". Merge them in order. 1. #6323: keep the chunks a server sent 2. #6324: BlueMap's lowres tiles, settings and palette 3. #6325: draw the rest from the server's BlueMap 4. #6326: Find BlueMap, and no re-mesh storms 5. **#6327 (this one)**: no rings of nothing, slabs or holes 6. #6643: read Bobby's cache too, written from its files on disk ## Other projects' code None. ## Checked - **CI on the fork** ([run](https://github.com/some-du6e/horizon/actions/runs/41362609329)): `clippy --all-targets -D warnings` on `horizon-client-render`, `horizon-client` and `horizon-mods` and the render crate's tests at every one of the 9 commits, and `cargo fmt --check`, the `horizon-client` tests and `horizon-mods`' modpack tests on the top one. - **Live test on GitHub Actions** ([run](https://github.com/some-du6e/horizon/actions/runs/41363312105)). The runner downloads the pinned 26.3 from Mojang (every file checked against Mojang's SHA-1) and runs `horizon-prepare`. Then: - It records a local world drawing a real server's BlueMap as far terrain ([video](https://github.com/some-du6e/horizon/releases/download/far-terrain-video/far-terrain-bluemap.mp4), recorded on these exact commits). [![Far terrain from a server's BlueMap](https://github.com/some-du6e/horizon/releases/download/far-terrain-video/far-terrain-bluemap.png)](https://github.com/some-du6e/horizon/releases/download/far-terrain-video/far-terrain-bluemap.mp4) - It runs `tools/server_lod_e2e.py` against a real dedicated server. With `horizon-lod-distance` set it reports `source: server`. Without it, it reports `source: server-terrain` (updated in PR 1). - **Review:** 16 rounds of independent reviewers, the last with no real findings (correctness, edge cases, tests, simplicity, fit) over the whole stack. Each finding went into the commit it belongs to. Since then, the `.bobby` reader came out and the stack was rebased on `main`; CI above is on the result. - **Not run:** the parity harnesses, and `pr_ready.py` (it needs `.local/`, which this machine doesn't build). Suggested labels, since this fork can't set them: `feature` and `needs-proof`. > [!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:26:57 +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#6797
No description provided.