[PR #1089] [MERGED] Video settings: cost tags from measured frame times, and Saves time for cave culling #3037

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

📋 Pull Request Information

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

Base: main ← Head: fix/video-cost-labels


📝 Commits (1)

  • a197ada Video settings: cost labels from measured frame times, and "Saves time" for cave culling

📊 Changes

4 files changed (+37 additions, -11 deletions)

View changed files

📝 crates/horizon-client/src/graphics_style.rs (+20 -1)
📝 crates/horizon-client/src/graphics_ui.rs (+6 -6)
📝 crates/horizon-client/src/ui_theme.rs (+10 -3)
📝 docs/graphics.md (+1 -1)

📄 Description

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

Fixes #897. Reported by rdbtCVS. They found that clouds, cloud distance, mipmaps and sky made no difference, that snow cost a lot, and asked for a tag that says when a setting makes the game faster.

What

The cost tags in Video Settings now follow measured frame times. There is also a fifth tag, Saves time, drawn in the success colour (Classic: bright green; Horizon shell: color::SUCCESS). It is for a setting that makes frames faster when it is on.

Setting Before Now Measured on the HD 620
Cave Culling No cost Saves time off adds 0.6–0.9 ms of GPU per frame (about 3.2 → 3.9 ms)
Weather Low cost High cost rain adds 2.5–3.2 ms of GPU (about 3.2 → 6.1 ms; FPS 284 → 163)
Weather Radius Low cost Medium cost in rain, radius 10 vs 3 is 1.8–2.0 ms of GPU
FXAA Low cost Medium cost on adds 0.5–1.0 ms of GPU
Clouds Medium cost Low cost fancy vs off: 0.05–0.1 ms of GPU
Mipmaps Low cost No cost 4 vs off: under 0.05 ms, within noise

Unchanged, because the measurement agrees with the tag or shows nothing:

  • Sky: Low. It costs 0.35–0.4 ms by day.
  • Cloud Range: Low. 128 vs 2 chunks is about 0.5 ms.
  • Resolution Scale: High. 50% saves 1.2 ms of GPU.
  • Cull Leaves: No cost. It made no difference in this scene.

Not changed for lack of a clean number:

  • Entity Culling, Entity Shadows and Particles: the scene had its mobs removed, so it had nothing for them to act on.
  • Cutout Leaves, Improved Transparency and Animated Textures: the runs disagreed with each other, more than the effect being measured.

How it was measured

settings_bench.py: one fresh game per variant, each changing one setting from the defaults through options.txt or horizon-graphics.txt. The scene was seed 1234, the village at (-960, 90, 150) at noon, render distance 12, with mobs, weather and time all pinned. Each variant was measured at two views, 3 × 5 s bench runs per view, medians.

The machine was a ThinkPad with an Intel HD 620 (Linux, Mesa Vulkan, offscreen 1280x720, nice 19). Default runs were placed at the start, middle and end to show drift. The integrated GPU is where these tags matter most. On the Mac mini the whole frame takes under 0.2 ms of GPU.

Each range above covers the runs whose default runs agree (GPU 3.19–3.42 ms). Later runs drifted once another job started on the ThinkPad and it warmed up (default GPU 4.4–6.2 ms), so I left those out. The Mac mini was too loaded by CI runners for the per-setting runs: the game did not start within 300 s.

Screenshots

Graphics: Advanced (Classic style), main and this PR:

main this PR
main this PR

Checks

  • cargo fmt --all --check: clean.
  • cargo clippy -p horizon-client --all-targets -- -D warnings with set -o pipefail: exit 0. This is scoped to the touched crate because workspace-wide clippy fails on the desktop on hidapi/libudev.
  • cargo test -p horizon-client: all pass (lib 942, plus the integration tests). New test every_cost_has_a_label_and_a_colour.
  • tools/parity.py --changed origin/main lists every harness (none has a pass history yet), so I ran the settings ones, options and world_options, on the desktop. Both pass on main at 1bcf90de and on this branch.

🤖 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/1089 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/video-cost-labels` --- ### 📝 Commits (1) - [`a197ada`](https://github.com/horizon-rust/horizon/commit/a197adaed09eb0945cb5d84fb4f38bff5f698807) Video settings: cost labels from measured frame times, and "Saves time" for cave culling ### 📊 Changes **4 files changed** (+37 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/graphics_style.rs` (+20 -1) 📝 `crates/horizon-client/src/graphics_ui.rs` (+6 -6) 📝 `crates/horizon-client/src/ui_theme.rs` (+10 -3) 📝 `docs/graphics.md` (+1 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #897. Reported by **rdbtCVS**. They found that clouds, cloud distance, mipmaps and sky made no difference, that snow cost a lot, and asked for a tag that says when a setting makes the game faster. ## What The cost tags in Video Settings now follow measured frame times. There is also a fifth tag, **Saves time**, drawn in the success colour (Classic: bright green; Horizon shell: `color::SUCCESS`). It is for a setting that makes frames faster when it is on. | Setting | Before | Now | Measured on the HD 620 | |---|---|---|---| | Cave Culling | No cost | **Saves time** | off adds 0.6–0.9 ms of GPU per frame (about 3.2 → 3.9 ms) | | Weather | Low cost | **High cost** | rain adds 2.5–3.2 ms of GPU (about 3.2 → 6.1 ms; FPS 284 → 163) | | Weather Radius | Low cost | **Medium cost** | in rain, radius 10 vs 3 is 1.8–2.0 ms of GPU | | FXAA | Low cost | **Medium cost** | on adds 0.5–1.0 ms of GPU | | Clouds | Medium cost | **Low cost** | fancy vs off: 0.05–0.1 ms of GPU | | Mipmaps | Low cost | **No cost** | 4 vs off: under 0.05 ms, within noise | Unchanged, because the measurement agrees with the tag or shows nothing: - Sky: Low. It costs 0.35–0.4 ms by day. - Cloud Range: Low. 128 vs 2 chunks is about 0.5 ms. - Resolution Scale: High. 50% saves 1.2 ms of GPU. - Cull Leaves: No cost. It made no difference in this scene. Not changed for lack of a clean number: - Entity Culling, Entity Shadows and Particles: the scene had its mobs removed, so it had nothing for them to act on. - Cutout Leaves, Improved Transparency and Animated Textures: the runs disagreed with each other, more than the effect being measured. ## How it was measured `settings_bench.py`: one fresh game per variant, each changing one setting from the defaults through `options.txt` or `horizon-graphics.txt`. The scene was seed 1234, the village at (-960, 90, 150) at noon, render distance 12, with mobs, weather and time all pinned. Each variant was measured at two views, 3 × 5 s `bench` runs per view, medians. The machine was a ThinkPad with an Intel HD 620 (Linux, Mesa Vulkan, offscreen 1280x720, nice 19). Default runs were placed at the start, middle and end to show drift. The integrated GPU is where these tags matter most. On the Mac mini the whole frame takes under 0.2 ms of GPU. Each range above covers the runs whose default runs agree (GPU 3.19–3.42 ms). Later runs drifted once another job started on the ThinkPad and it warmed up (default GPU 4.4–6.2 ms), so I left those out. The Mac mini was too loaded by CI runners for the per-setting runs: the game did not start within 300 s. ## Screenshots Graphics: Advanced (Classic style), main and this PR: | main | this PR | |---|---| | ![main](https://raw.githubusercontent.com/ludovic111/horizon/854504b061d05e2cbb6fc6c397cf9496da278720/costs/base-top.png) | ![this PR](https://raw.githubusercontent.com/ludovic111/horizon/854504b061d05e2cbb6fc6c397cf9496da278720/costs/costs-top.png) | ## Checks - `cargo fmt --all --check`: clean. - `cargo clippy -p horizon-client --all-targets -- -D warnings` with `set -o pipefail`: exit 0. This is scoped to the touched crate because workspace-wide clippy fails on the desktop on hidapi/libudev. - `cargo test -p horizon-client`: all pass (lib 942, plus the integration tests). New test `every_cost_has_a_label_and_a_colour`. - `tools/parity.py --changed origin/main` lists every harness (none has a pass history yet), so I ran the settings ones, `options` and `world_options`, on the desktop. Both pass on main at 1bcf90de and on this branch. 🤖 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-02 16:00:59 +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#3037
No description provided.