[PR #1199] [MERGED] Far Detail: opt-in Reduced far terrain, suggested on integrated GPUs (HD 620: GPU −2.4 to −4.3 ms) #3413

Closed
opened 2026-11-03 04:09:20 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1199
Author: @ludovic111
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @ludovic111

Base: main ← Head: feat/far-detail-reduced


📝 Commits (2)

  • d033006 Far Detail: an opt-in Reduced level for far terrain, suggested on integrated GPUs
  • ed76af1 Merge origin/main into feat/far-detail-reduced

📊 Changes

6 files changed (+168 additions, -14 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+4 -0)
📝 crates/horizon-client/src/game/control.rs (+2 -0)
📝 crates/horizon-client/src/gfx.rs (+8 -0)
📝 crates/horizon-client/src/graphics.rs (+67 -1)
📝 crates/horizon-client/src/graphics_ui.rs (+18 -2)
📝 crates/horizon-client/src/lod.rs (+69 -11)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Part of the frame-cost batch (Kira card #23). This is the opt-in setting the orchestrator decided on 2026-10-19 for weak GPUs.

What

A new setting, Far Detail: Full / Reduced, sits under LOD Distance in Simple and Advanced (farDetail in horizon-graphics.txt).

  • Full is the default everywhere and draws far terrain exactly as today. No preset changes it.
  • Reduced starts each far-terrain tile level at half the distance (a tile splits below 4× its size instead of 8×). Far cells are twice as wide at every distance, which leaves about a quarter of the cells beyond the full-detail edge. The finest tiles along that edge stay, so the seam with the near terrain doesn't change.
  • Suggested, never switched. On integrated GPUs other than Apple's (lod_capped, the GPUs the 128-chunk LOD cap already applies to), the setting's description reads "Reduced draws far terrain coarser: faster on this integrated GPU." Elsewhere it reads "Reduced draws far terrain coarser, for GPUs it slows down." Nothing switches it on.
  • horizon-ctl status gains lod.far_detail and lod.resident_quads (far terrain quads with GPU buffers), for benchmarks.

Nothing changes unless the player picks Reduced and has LOD Distance on.

Before / after: HD 620 (where it matters)

ThinkPad: i5 Kaby Lake-U, HD 620, Mesa 26.1.8 Vulkan, 1280×720 offscreen.

Setup:

  • seed 1234 template world, render distance 16, LOD Distance 128 (the integrated-GPU cap), ticks frozen, HUD off, uncapped;
  • 10 s still at each view, after every far tile was sampled;
  • Full and Reduced interleaved, 2 runs each, averaged.
view far quads frame avg ms p99 ms frames > 16.7 ms CPU ms GPU ms
overview 1.27 M → 0.86 M 12.40 → 9.81 21.1 → 14.4 18.5 → 3 6.66 → 4.41 12.02 → 9.58
peak 2.52 M → 1.80 M 13.91 → 9.59 17.7 → 13.2 12.5 → 1 7.77 → 4.24 13.63 → 9.38
mountain 4.28 M → 1.77 M 11.51 → 8.15 17.2 → 12.7 11.5 → 1 5.90 → 3.90 11.20 → 7.95
  • GPU and frame time: 20–31% less frame time and 2.4–4.3 ms less GPU time per frame.
  • CPU: lower too, with fewer tile draws to record.
  • Mac mini (M4 Pro, Metal), same views: far quads 3.95–4.31 M → 1.67–1.80 M (−58%). The GPU time there is under 1 ms either way.

Screenshots

Full on the left, Reduced on the right, HD 620, at the views above. They are in ~/code/horizon-parity/shots/perf-frame-11/thinkpad/far-{overview,peak,mountain}-full-vs-reduced.png. Mac captures are in mac/far-shots/.

At 1280×720 the difference is hard to see. Distant slopes show slightly larger steps, and distant coastlines and forests are a little blockier. Full is unchanged, because the plan with reduced = false is the same code path as before.

How tested (Mac mini M4 Pro)

On one integration commit with #1198 (section draws grouped by page):

  • cargo fmt --all --check: ok
  • set -o pipefail; cargo clippy --workspace --all-targets -- -D warnings: ok
  • cargo test -p horizon-client: 989 + 91 + 15 + 2 + 2 + 2 + 1 passed, 0 failed.
    • reduced_far_detail_only_merges_tiles_away_from_the_near_terrain: Reduced never splits a tile Full doesn't, keeps level-0 tiles at the near edge, and has under half the tiles.
    • far_detail_is_full_unless_reduced_is_picked: parsing, the default, and that no preset changes it.
  • tools/parity.py --changed origin/main: 102 passed, 0 failed.

Data: ~/code/horizon-parity/shots/perf-frame-11/thinkpad/far.jsonl, mac/mac-far.jsonl.

Label: feature.

Needs Ludovic: nothing, unless he wants Reduced worded differently in the settings.

🤖 Generated with 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/1199 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/far-detail-reduced` --- ### 📝 Commits (2) - [`d033006`](https://github.com/horizon-rust/horizon/commit/d0330061bdbb896d9c3b3b4d3447caba3230df1f) Far Detail: an opt-in Reduced level for far terrain, suggested on integrated GPUs - [`ed76af1`](https://github.com/horizon-rust/horizon/commit/ed76af1c11694e13fe7836919b27e625e65a5aaa) Merge origin/main into feat/far-detail-reduced ### 📊 Changes **6 files changed** (+168 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+4 -0) 📝 `crates/horizon-client/src/game/control.rs` (+2 -0) 📝 `crates/horizon-client/src/gfx.rs` (+8 -0) 📝 `crates/horizon-client/src/graphics.rs` (+67 -1) 📝 `crates/horizon-client/src/graphics_ui.rs` (+18 -2) 📝 `crates/horizon-client/src/lod.rs` (+69 -11) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Part of the frame-cost batch (Kira card #23). This is the opt-in setting the orchestrator decided on 2026-10-19 for weak GPUs. ## What A new setting, **Far Detail: Full / Reduced**, sits under LOD Distance in Simple and Advanced (`farDetail` in `horizon-graphics.txt`). - **Full** is the default everywhere and draws far terrain exactly as today. No preset changes it. - **Reduced** starts each far-terrain tile level at half the distance (a tile splits below 4× its size instead of 8×). Far cells are twice as wide at every distance, which leaves about a quarter of the cells beyond the full-detail edge. The finest tiles along that edge stay, so the seam with the near terrain doesn't change. - **Suggested, never switched.** On integrated GPUs other than Apple's (`lod_capped`, the GPUs the 128-chunk LOD cap already applies to), the setting's description reads "Reduced draws far terrain coarser: faster on this integrated GPU." Elsewhere it reads "Reduced draws far terrain coarser, for GPUs it slows down." Nothing switches it on. - `horizon-ctl status` gains `lod.far_detail` and `lod.resident_quads` (far terrain quads with GPU buffers), for benchmarks. Nothing changes unless the player picks Reduced and has LOD Distance on. ## Before / after: HD 620 (where it matters) **ThinkPad**: i5 Kaby Lake-U, HD 620, Mesa 26.1.8 Vulkan, 1280×720 offscreen. Setup: - seed 1234 template world, render distance 16, LOD Distance 128 (the integrated-GPU cap), ticks frozen, HUD off, uncapped; - 10 s still at each view, after every far tile was sampled; - Full and Reduced interleaved, 2 runs each, averaged. | view | far quads | frame avg ms | p99 ms | frames > 16.7 ms | CPU ms | GPU ms | |---|---|---|---|---|---|---| | overview | 1.27 M → 0.86 M | 12.40 → **9.81** | 21.1 → **14.4** | 18.5 → 3 | 6.66 → 4.41 | 12.02 → **9.58** | | peak | 2.52 M → 1.80 M | 13.91 → **9.59** | 17.7 → **13.2** | 12.5 → 1 | 7.77 → 4.24 | 13.63 → **9.38** | | mountain | 4.28 M → 1.77 M | 11.51 → **8.15** | 17.2 → **12.7** | 11.5 → 1 | 5.90 → 3.90 | 11.20 → **7.95** | - **GPU and frame time**: 20–31% less frame time and 2.4–4.3 ms less GPU time per frame. - **CPU**: lower too, with fewer tile draws to record. - **Mac mini (M4 Pro, Metal)**, same views: far quads 3.95–4.31 M → 1.67–1.80 M (−58%). The GPU time there is under 1 ms either way. ## Screenshots Full on the left, Reduced on the right, HD 620, at the views above. They are in `~/code/horizon-parity/shots/perf-frame-11/thinkpad/far-{overview,peak,mountain}-full-vs-reduced.png`. Mac captures are in `mac/far-shots/`. At 1280×720 the difference is hard to see. Distant slopes show slightly larger steps, and distant coastlines and forests are a little blockier. Full is unchanged, because the plan with `reduced = false` is the same code path as before. ## How tested (Mac mini M4 Pro) On one integration commit with #1198 (section draws grouped by page): - `cargo fmt --all --check`: ok - `set -o pipefail; cargo clippy --workspace --all-targets -- -D warnings`: ok - `cargo test -p horizon-client`: 989 + 91 + 15 + 2 + 2 + 2 + 1 passed, 0 failed. - `reduced_far_detail_only_merges_tiles_away_from_the_near_terrain`: Reduced never splits a tile Full doesn't, keeps level-0 tiles at the near edge, and has under half the tiles. - `far_detail_is_full_unless_reduced_is_picked`: parsing, the default, and that no preset changes it. - `tools/parity.py --changed origin/main`: **102 passed, 0 failed**. Data: `~/code/horizon-parity/shots/perf-frame-11/thinkpad/far.jsonl`, `mac/mac-far.jsonl`. Label: `feature`. Needs Ludovic: nothing, unless he wants Reduced worded differently in the settings. 🤖 Generated with [Claude Code](https://claude.com/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 04:09:20 +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#3413
No description provided.