[PR #771] [MERGED] Add seed-driven voxel-column terrain LODs up to 1024 chunks #2799

Closed
opened 2026-11-02 15:59:08 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/terrain-lod


📝 Commits (10+)

  • bae7975 Add bounded hierarchical surface terrain LODs for distant views (#718)
  • 9ce7397 Merge remote-tracking branch 'origin/main' into feat/terrain-lod
  • 594929b Validate LOD loading, shader depth and current terrain draw paths
  • fde95ff Build distant terrain from sparse seed samples and layered voxel columns
  • dde52bc Merge remote-tracking branch 'origin/main' into feat/terrain-lod
  • 3d0b764 Merge origin/main into feat/terrain-lod
  • 1935cfc Translucent draws: main's order when no distant tile has water
  • a3f38b7 Merge origin/main into feat/terrain-lod
  • c74948d Uploads: main's path again when no upload budget is set
  • 4f99202 Merge origin/main into feat/terrain-lod

📊 Changes

32 files changed (+5891 additions, -89 deletions)

View changed files

📝 crates/horizon-client/src/flatgen.rs (+36 -1)
📝 crates/horizon-client/src/fog.rs (+47 -0)
📝 crates/horizon-client/src/game.rs (+133 -10)
📝 crates/horizon-client/src/game/control.rs (+25 -0)
📝 crates/horizon-client/src/game/packs.rs (+1 -0)
📝 crates/horizon-client/src/game/remote.rs (+6 -0)
📝 crates/horizon-client/src/game/render_tick.rs (+2 -1)
📝 crates/horizon-client/src/gfx.rs (+182 -54)
📝 crates/horizon-client/src/gfx/flat.rs (+2 -2)
➕ crates/horizon-client/src/gfx/lod.rs (+146 -0)
📝 crates/horizon-client/src/gfx/translucency.rs (+43 -0)
📝 crates/horizon-client/src/graphics.rs (+20 -1)
📝 crates/horizon-client/src/graphics_ui.rs (+54 -2)
📝 crates/horizon-client/src/lib.rs (+1 -0)
➕ crates/horizon-client/src/lod.rs (+1727 -0)
➕ crates/horizon-client/src/lod/mesh.rs (+1178 -0)
📝 crates/horizon-client/src/mesher.rs (+14 -0)
📝 crates/horizon-client/src/mesher/facing.rs (+5 -0)
📝 crates/horizon-client/src/save.rs (+559 -1)
📝 crates/horizon-client/src/streaming.rs (+74 -1)

...and 12 more files

📄 Description

What and why

Refs #718. Adds opt-in terrain LODs at 64–1024 chunks, with independent Full Detail Distance and simulation distance.

A quadtree selects progressively coarser tiles of layered voxel columns with material spans and air gaps. Exposed faces are greedily merged using block textures, biome tints and lighting. Unknown terrain samples the seed-bound density/surface rules directly on a sparse lattice, with approximate biome vegetation; bounded ordinary generation refines the nearest LOD levels. Saved and visited terrain takes precedence.

Background sampling, cached reductions, shared decoration halos and projected-distance priorities improve initial coverage. Parent tiles fill missing detail without replacing completed children. Ordinary mesh uploads yield after a soft 4 ms per frame, including with LODs off. Overworld distance fog extends to the LOD range while fluid/effect/boss limits remain intact.

Vanilla reference

Horizon-only feature. Reuses Horizon's seeded noise/surface pipeline and ordinary chunk decoration; far previews approximate them rather than claiming exact vanilla generation. Merged current main, preserving its GPU upload batching, block-entity revisions and asynchronous near-terrain occlusion.

Self-check

  • 71 focused tests passed after merging main: density (32), actual seeded worldgen (1), LOD planning/meshing/vegetation/native refinement (18), saved terrain (3), fog (7), renderer helpers (10).
  • Fast client build, client/world/core all-target Clippy with warnings denied, formatting, diff whitespace and public-tree checks passed.
  • Fresh-seed Vulkan probes exercised progressive 1024-chunk coverage and Off cleanup. The author tested and approved the prior local preview; a separate rebuilt preview includes the main merge.
  • Shader-pack testing is deferred. LODs share existing terrain colour/depth passes; no new Iris material/shadow passes or DH/Voxy APIs are supplied.

Remaining limits

Far vegetation, fluid boundaries and lighting are approximate; unexplored distant structures are absent from direct sampling. Native refinement can differ in decoration order. Far data is regenerated after reopening; full target detail continues refining after initial coverage. This does not execute arbitrary Fabric/NeoForge worldgen mods or provide unknown-seed remote-server generation. Other GPU/backend performance and broader visual coverage remain unverified.


🔄 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/771 **Author:** [@Online5277](https://github.com/Online5277) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/19/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/terrain-lod` --- ### 📝 Commits (10+) - [`bae7975`](https://github.com/horizon-rust/horizon/commit/bae797575737c6568083faf6f929edc338892b53) Add bounded hierarchical surface terrain LODs for distant views (#718) - [`9ce7397`](https://github.com/horizon-rust/horizon/commit/9ce739796e36ccb22371679da3abbc825ee6b888) Merge remote-tracking branch 'origin/main' into feat/terrain-lod - [`594929b`](https://github.com/horizon-rust/horizon/commit/594929b7956bf3ef5206ceff880c3e9049a88fc4) Validate LOD loading, shader depth and current terrain draw paths - [`fde95ff`](https://github.com/horizon-rust/horizon/commit/fde95ff20e31a6503b4885ba8503301dc9dc100b) Build distant terrain from sparse seed samples and layered voxel columns - [`dde52bc`](https://github.com/horizon-rust/horizon/commit/dde52bc1e9a0abbb1ca5d97a198787ad5af5b5a3) Merge remote-tracking branch 'origin/main' into feat/terrain-lod - [`3d0b764`](https://github.com/horizon-rust/horizon/commit/3d0b76400b34ae01171c3c9e33f5d372e39e21a7) Merge origin/main into feat/terrain-lod - [`1935cfc`](https://github.com/horizon-rust/horizon/commit/1935cfc7e596000dba35689e7dd176c85ddca696) Translucent draws: main's order when no distant tile has water - [`a3f38b7`](https://github.com/horizon-rust/horizon/commit/a3f38b76aa19b266c5a4c15b7cef55698225ca9a) Merge origin/main into feat/terrain-lod - [`c74948d`](https://github.com/horizon-rust/horizon/commit/c74948d24c1338cf12458d01d9207edae37a46ef) Uploads: main's path again when no upload budget is set - [`4f99202`](https://github.com/horizon-rust/horizon/commit/4f992028bf51699e16918d7cec8c6a28a7bed173) Merge origin/main into feat/terrain-lod ### 📊 Changes **32 files changed** (+5891 additions, -89 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/flatgen.rs` (+36 -1) 📝 `crates/horizon-client/src/fog.rs` (+47 -0) 📝 `crates/horizon-client/src/game.rs` (+133 -10) 📝 `crates/horizon-client/src/game/control.rs` (+25 -0) 📝 `crates/horizon-client/src/game/packs.rs` (+1 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+6 -0) 📝 `crates/horizon-client/src/game/render_tick.rs` (+2 -1) 📝 `crates/horizon-client/src/gfx.rs` (+182 -54) 📝 `crates/horizon-client/src/gfx/flat.rs` (+2 -2) ➕ `crates/horizon-client/src/gfx/lod.rs` (+146 -0) 📝 `crates/horizon-client/src/gfx/translucency.rs` (+43 -0) 📝 `crates/horizon-client/src/graphics.rs` (+20 -1) 📝 `crates/horizon-client/src/graphics_ui.rs` (+54 -2) 📝 `crates/horizon-client/src/lib.rs` (+1 -0) ➕ `crates/horizon-client/src/lod.rs` (+1727 -0) ➕ `crates/horizon-client/src/lod/mesh.rs` (+1178 -0) 📝 `crates/horizon-client/src/mesher.rs` (+14 -0) 📝 `crates/horizon-client/src/mesher/facing.rs` (+5 -0) 📝 `crates/horizon-client/src/save.rs` (+559 -1) 📝 `crates/horizon-client/src/streaming.rs` (+74 -1) _...and 12 more files_ </details> ### 📄 Description ## What and why Refs #718. Adds opt-in terrain LODs at 64–1024 chunks, with independent Full Detail Distance and simulation distance. A quadtree selects progressively coarser tiles of layered voxel columns with material spans and air gaps. Exposed faces are greedily merged using block textures, biome tints and lighting. Unknown terrain samples the seed-bound density/surface rules directly on a sparse lattice, with approximate biome vegetation; bounded ordinary generation refines the nearest LOD levels. Saved and visited terrain takes precedence. Background sampling, cached reductions, shared decoration halos and projected-distance priorities improve initial coverage. Parent tiles fill missing detail without replacing completed children. Ordinary mesh uploads yield after a soft 4 ms per frame, including with LODs off. Overworld distance fog extends to the LOD range while fluid/effect/boss limits remain intact. ## Vanilla reference Horizon-only feature. Reuses Horizon's seeded noise/surface pipeline and ordinary chunk decoration; far previews approximate them rather than claiming exact vanilla generation. Merged current main, preserving its GPU upload batching, block-entity revisions and asynchronous near-terrain occlusion. ## Self-check - 71 focused tests passed after merging main: density (32), actual seeded worldgen (1), LOD planning/meshing/vegetation/native refinement (18), saved terrain (3), fog (7), renderer helpers (10). - Fast client build, client/world/core all-target Clippy with warnings denied, formatting, diff whitespace and public-tree checks passed. - Fresh-seed Vulkan probes exercised progressive 1024-chunk coverage and Off cleanup. The author tested and approved the prior local preview; a separate rebuilt preview includes the main merge. - Shader-pack testing is deferred. LODs share existing terrain colour/depth passes; no new Iris material/shadow passes or DH/Voxy APIs are supplied. ## Remaining limits Far vegetation, fluid boundaries and lighting are approximate; unexplored distant structures are absent from direct sampling. Native refinement can differ in decoration order. Far data is regenerated after reopening; full target detail continues refining after initial coverage. This does not execute arbitrary Fabric/NeoForge worldgen mods or provide unknown-seed remote-server generation. Other GPU/backend performance and broader visual coverage remain unverified. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:59:08 +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#2799
No description provided.