[PR #3000] [MERGED] Draw small End islands in LOD terrain #4752

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3000
Author: @hectoreccles
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @ludovic111

Base: main ← Head: lod-small-end-islands


📝 Commits (4)

  • b561f83 Draw small End islands in LOD terrain
  • a96f66c Replay vanilla's small End island placement
  • dc3fc69 Decoration: World keeps its own doc comment
  • 25f4545 Merge main into this branch

📊 Changes

7 files changed (+495 additions, -4 deletions)

View changed files

📝 crates/horizon-client/src/vanillagen/lod.rs (+168 -1)
➕ crates/horizon-client/src/vanillagen/lod/islands.rs (+206 -0)
📝 crates/horizon-client/src/vanillagen/lod/vegetation.rs (+1 -1)
📝 crates/horizon-world/src/worldgen/decoration.rs (+8 -0)
📝 crates/horizon-world/src/worldgen/generator.rs (+22 -0)
📝 crates/horizon-world/src/worldgen/generator_decoration.rs (+89 -1)
📝 docs/graphics.md (+1 -1)

📄 Description

🤖 Opened by Hector Eccles's AI agent (DeepSeek V4.1 Flash via OpenCode), not by Hector himself.

What and why

Distant End terrain now draws the small End islands.

minecraft:small_end_islands has exactly one feature, minecraft:end_island_decorated, and the direct far sampler ignored it, so unexplored small islands were empty void. They could not simply be approximated: a hash-placed island with the right density still lands in the wrong chunk, so it visually disappears as soon as the real chunk loads. This change reproduces vanilla's placement instead:

  • replays the chunk's decoration seed, the feature's step-local identity/step seed, and the real placement modifiers;
  • runs the feature on a no-op world so its own random draws (radius and per-layer shrink) advance the stream exactly;
  • uses those exact origins and heights for the far cone, so an estimated island stays where it is when refined/full chunks arrive; only the cone silhouette refines;
  • keeps the existing visual cone approximation (the feature itself is not stored block-for-block);
  • drops the old per-void-cell biome sampling; the placed feature's own biome filter decides.

Refined, visited and saved chunks still take precedence. This PR is limited to the small-End-island estimator and feature replay; no other far-terrain features and no runtime lod.rs changes.

Vanilla reference

This follows EndIslandFeature (BasicFeature::EndIsland), minecraft:end_island_decorated, WorldgenRandom.set_decoration_seed / set_feature_seed, and the placement-modifier chain (rarity_filter, weighted count, in_square, height_range, biome) already ported in horizon-world. No new worldgen.

Self-check

pr_ready (tools/pr_ready.py --quick on Hectors-MacBook-Pro-544, against origin/main at 1feb28c04, 2 min 48 s)

Check Result
Scope ✅ 7 files, +495 −4
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 398 passed (29 s)
rustfmt ✅ (5 s)
clippy ✅ (51 s)
tests: horizon-client, horizon-world ✅ 1513 passed (1 min 0 s)
doc tests ✅ 0 passed (23 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)

Also ran the resource-gated far-terrain tests with prepared 26.3 data:

HORIZON_TEST_RESOURCES=.local/horizon-client/26.3 \
  cargo test -p horizon-client --lib vanillagen::lod::tests::end_small_islands -- --include-ignored
# 2 passed

end_small_islands_from_decoration_survive_far_columns compares the replay with a real decorated chunk: the real feature origins [1030, 65, -6709] and [1039, 66, -6707] are reproduced exactly, including the second island whose position depends on the first feature's RNG draws.

Performance

Fixed End camera (seed 1234, 1024 150 -6656), render distance 2, LOD 256; time from enabling LOD until sampled_target_tiles == target_tiles; 3 runs each, offscreen on an Apple M4 Max.

Build Median fill Mean Resident quads
Before the island estimator 17.88 s 18.41 s 1,368,747
Hash estimator 17.92 s 17.99 s 1,416,184
This PR (exact placement) 17.80 s 17.80 s 1,416,138

H1 is −0.12 s median (−0.7%) vs the hash estimator and −0.08 s (−0.4%) vs no estimator: within run-to-run noise. The island geometry itself adds 3.5% resident quads; the estimator's CPU is not measurable against density, meshing and upload. The exact replay is offset by dropping the old per-void-cell biome samples.

Screenshots

Small End islands in LOD terrain

The screenshot lives on a fork-only screenshots branch so it stays out of this PR's diff.

🤖 Generated with OpenCode


🔄 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/3000 **Author:** [@hectoreccles](https://github.com/hectoreccles) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `lod-small-end-islands` --- ### 📝 Commits (4) - [`b561f83`](https://github.com/horizon-rust/horizon/commit/b561f83220d87bee01eedc090e50297ec6c4e207) Draw small End islands in LOD terrain - [`a96f66c`](https://github.com/horizon-rust/horizon/commit/a96f66ce1e3fe9fc3f2511366403ce627dce91bf) Replay vanilla's small End island placement - [`dc3fc69`](https://github.com/horizon-rust/horizon/commit/dc3fc6961ec889d44242d47ef7e217ee85a447c5) Decoration: World keeps its own doc comment - [`25f4545`](https://github.com/horizon-rust/horizon/commit/25f454503855c454de1557f5a759cd274be48d33) Merge main into this branch ### 📊 Changes **7 files changed** (+495 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/vanillagen/lod.rs` (+168 -1) ➕ `crates/horizon-client/src/vanillagen/lod/islands.rs` (+206 -0) 📝 `crates/horizon-client/src/vanillagen/lod/vegetation.rs` (+1 -1) 📝 `crates/horizon-world/src/worldgen/decoration.rs` (+8 -0) 📝 `crates/horizon-world/src/worldgen/generator.rs` (+22 -0) 📝 `crates/horizon-world/src/worldgen/generator_decoration.rs` (+89 -1) 📝 `docs/graphics.md` (+1 -1) </details> ### 📄 Description > 🤖 Opened by Hector Eccles's AI agent (DeepSeek V4.1 Flash via OpenCode), not by Hector himself. ## What and why Distant End terrain now draws the small End islands. `minecraft:small_end_islands` has exactly one feature, `minecraft:end_island_decorated`, and the direct far sampler ignored it, so unexplored small islands were empty void. They could not simply be approximated: a hash-placed island with the right density still lands in the wrong chunk, so it visually disappears as soon as the real chunk loads. This change reproduces vanilla's placement instead: - replays the chunk's decoration seed, the feature's **step-local identity/step** seed, and the real placement modifiers; - runs the feature on a no-op world so its own random draws (radius and per-layer shrink) advance the stream exactly; - uses those exact origins and heights for the far cone, so an estimated island stays where it is when refined/full chunks arrive; only the cone silhouette refines; - keeps the existing visual cone approximation (the feature itself is not stored block-for-block); - drops the old per-void-cell biome sampling; the placed feature's own biome filter decides. Refined, visited and saved chunks still take precedence. This PR is limited to the small-End-island estimator and feature replay; no other far-terrain features and no runtime `lod.rs` changes. ## Vanilla reference This follows `EndIslandFeature` (`BasicFeature::EndIsland`), `minecraft:end_island_decorated`, `WorldgenRandom.set_decoration_seed` / `set_feature_seed`, and the placement-modifier chain (`rarity_filter`, weighted `count`, `in_square`, `height_range`, `biome`) already ported in `horizon-world`. No new worldgen. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on Hectors-MacBook-Pro-544, against origin/main at 1feb28c04, 2 min 48 s) | Check | Result | | --- | --- | | Scope | ✅ 7 files, +495 −4 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 398 passed (29 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (51 s) | | tests: horizon-client, horizon-world | ✅ 1513 passed (1 min 0 s) | | doc tests | ✅ 0 passed (23 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) | Also ran the resource-gated far-terrain tests with prepared 26.3 data: ```sh HORIZON_TEST_RESOURCES=.local/horizon-client/26.3 \ cargo test -p horizon-client --lib vanillagen::lod::tests::end_small_islands -- --include-ignored # 2 passed ``` `end_small_islands_from_decoration_survive_far_columns` compares the replay with a real decorated chunk: the real feature origins `[1030, 65, -6709]` and `[1039, 66, -6707]` are reproduced exactly, including the second island whose position depends on the first feature's RNG draws. ## Performance Fixed End camera (seed 1234, `1024 150 -6656`), render distance 2, LOD 256; time from enabling LOD until `sampled_target_tiles == target_tiles`; 3 runs each, offscreen on an Apple M4 Max. | Build | Median fill | Mean | Resident quads | | --- | --- | --- | --- | | Before the island estimator | 17.88 s | 18.41 s | 1,368,747 | | Hash estimator | 17.92 s | 17.99 s | 1,416,184 | | **This PR (exact placement)** | **17.80 s** | **17.80 s** | 1,416,138 | H1 is −0.12 s median (−0.7%) vs the hash estimator and −0.08 s (−0.4%) vs no estimator: within run-to-run noise. The island geometry itself adds 3.5% resident quads; the estimator's CPU is not measurable against density, meshing and upload. The exact replay is offset by dropping the old per-void-cell biome samples. ## Screenshots ![Small End islands in LOD terrain](https://raw.githubusercontent.com/hectoreccles/horizon/lod-islands-shots/lod-shots/demo-end-islands.png) The screenshot lives on a fork-only screenshots branch so it stays out of this PR's diff. 🤖 Generated with [OpenCode](https://opencode.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:40 +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#4752
No description provided.