[PR #2028] [MERGED] Options > Horizon Settings > Shader Packs: pick a pack of either kind #3951

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

📋 Pull Request Information

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

Base: main ← Head: feat/shader-packs-page


📝 Commits (1)

  • 70b832d Options > Horizon Settings > Shader Packs: pick a pack of either kind

📊 Changes

14 files changed (+281 additions, -37 deletions)

View changed files

📝 crates/horizon-client/src/bin/horizon-ctl/commands.rs (+1 -0)
📝 crates/horizon-client/src/game/control.rs (+5 -0)
📝 crates/horizon-client/src/game/native_shaders.rs (+14 -4)
📝 crates/horizon-client/src/game/options.rs (+15 -0)
📝 crates/horizon-client/src/game/shader_packs.rs (+21 -11)
📝 crates/horizon-client/src/game/startup_menu.rs (+10 -0)
📝 crates/horizon-client/src/gfx.rs (+6 -0)
📝 crates/horizon-client/src/graphics.rs (+9 -1)
📝 crates/horizon-client/src/lib.rs (+1 -0)
📝 crates/horizon-client/src/options_ui.rs (+77 -14)
📝 crates/horizon-client/src/settings.rs (+5 -0)
➕ crates/horizon-client/src/shader_pack_list.rs (+109 -0)
📝 docs/horizon-ctl-commands.md (+1 -1)
📝 docs/shaders.md (+7 -6)

📄 Description

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

#2026 is merged; this is based on it.

What

Players get Options > Horizon Settings > Shader Packs. The page is built from vanilla's widgets, like the Mods page (docs/design-system.md: Horizon's own settings pages are vanilla widgets).

  • It lists shaderpacks/ beside options.txt: Horizon's own packs first, marked "(Horizon)" and named by their manifest, then packs in the shaders/ format (a zip, or a folder holding shaders/). Other files and hidden folders are skipped. A pack that can't be read is still listed under its file name, and picking it says why in the chat.
  • One pack runs at a time. Clicking a pack picks it, and clicking the picked one turns it off. "Open Pack Folder" opens the folder. The list is read when the page opens.
  • The pick is saved in horizon-graphics.txt as pickedShaderPack. This is a new key: versions before the clean-room rewrite saved shaderPack, which stays ignored (the existing test still checks that), so old picks don't come back.
  • A new pick drops the running pack of either kind (Renderer::drop_shader_packs). The next frame loads the new one. HORIZON_SHADER_PACK still wins, for development.
  • Horizon Settings rows: Graphics / Advanced Graphics, Shader Packs / Controller Settings, Extras / Mods, Discord presence / AI Agent, then No AI. With No AI on, the last two rows are Discord presence / No AI.
  • horizon-ctl options shader-packs opens the page.

Checked in the game

Offscreen, Metal. The run listed both kinds, picked Golden Hour (it drew), then Sildur's Vibrant (the shaders/ path drew it, and Golden Hour was dropped), then turned it off (vanilla look, pickedShaderPack: empty). Screenshots are in ~/code/horizon-parity/screenshots/shaders-api-2/: page-list.png, page-picked.png, page-world-golden.png, page-world-java.png, page-world-off.png.

Self-check

pr_ready (tools/pr_ready.py --quick --base feat/shader-pass-times on ludovics-mac-mini, against feat/shader-pass-times at c3763ff1b, 7 min 57 s)

Check Result
Scope ✅ 14 files, +281 −37
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (18 s)
clippy ✅ (2 min 9 s)
tests: horizon-client ✅ 1296 passed (4 min 10 s)
doc tests ✅ 0 passed (6 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 112 affected, to run in CI (--quick): ambient_sound, arrow, audio_attributes, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_transformer, breaking_model, camera and 100 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Harnesses (tools/parity.py --changed origin/main at 70b832d65; selection by reached items since #1964): 38 passed, 0 failed.

A/B, no pack (paired, alternating, 3 rounds of horizon-ctl bench 15, offscreen, same seed and view; the machine was busy, so rounds vary): #2026's head CPU 0.851 / 0.875 / 0.743 ms (mean 0.823), GPU mean 1.673 ms; this PR CPU 0.885 / 0.774 / 0.741 ms (mean 0.800), GPU mean 1.786 ms. Frame p99 11.06 vs 10.78 ms. No cost beyond noise. Without a pick, the page's per-tick work is one string comparison.

🤖 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/2028 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/shader-packs-page` --- ### 📝 Commits (1) - [`70b832d`](https://github.com/horizon-rust/horizon/commit/70b832d658c84d586c2e80522044d851e51a7097) Options > Horizon Settings > Shader Packs: pick a pack of either kind ### 📊 Changes **14 files changed** (+281 additions, -37 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/bin/horizon-ctl/commands.rs` (+1 -0) 📝 `crates/horizon-client/src/game/control.rs` (+5 -0) 📝 `crates/horizon-client/src/game/native_shaders.rs` (+14 -4) 📝 `crates/horizon-client/src/game/options.rs` (+15 -0) 📝 `crates/horizon-client/src/game/shader_packs.rs` (+21 -11) 📝 `crates/horizon-client/src/game/startup_menu.rs` (+10 -0) 📝 `crates/horizon-client/src/gfx.rs` (+6 -0) 📝 `crates/horizon-client/src/graphics.rs` (+9 -1) 📝 `crates/horizon-client/src/lib.rs` (+1 -0) 📝 `crates/horizon-client/src/options_ui.rs` (+77 -14) 📝 `crates/horizon-client/src/settings.rs` (+5 -0) ➕ `crates/horizon-client/src/shader_pack_list.rs` (+109 -0) 📝 `docs/horizon-ctl-commands.md` (+1 -1) 📝 `docs/shaders.md` (+7 -6) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. #2026 is merged; this is based on it. ## What Players get Options > Horizon Settings > **Shader Packs**. The page is built from vanilla's widgets, like the Mods page (docs/design-system.md: Horizon's own settings pages are vanilla widgets). - It lists `shaderpacks/` beside `options.txt`: Horizon's own packs first, marked "(Horizon)" and named by their manifest, then packs in the `shaders/` format (a zip, or a folder holding `shaders/`). Other files and hidden folders are skipped. A pack that can't be read is still listed under its file name, and picking it says why in the chat. - One pack runs at a time. Clicking a pack picks it, and clicking the picked one turns it off. "Open Pack Folder" opens the folder. The list is read when the page opens. - The pick is saved in `horizon-graphics.txt` as `pickedShaderPack`. This is a new key: versions before the clean-room rewrite saved `shaderPack`, which stays ignored (the existing test still checks that), so old picks don't come back. - A new pick drops the running pack of either kind (`Renderer::drop_shader_packs`). The next frame loads the new one. `HORIZON_SHADER_PACK` still wins, for development. - Horizon Settings rows: Graphics / Advanced Graphics, **Shader Packs** / Controller Settings, Extras / Mods, Discord presence / AI Agent, then No AI. With No AI on, the last two rows are Discord presence / No AI. - `horizon-ctl options shader-packs` opens the page. ## Checked in the game Offscreen, Metal. The run listed both kinds, picked Golden Hour (it drew), then Sildur's Vibrant (the shaders/ path drew it, and Golden Hour was dropped), then turned it off (vanilla look, `pickedShaderPack:` empty). Screenshots are in `~/code/horizon-parity/screenshots/shaders-api-2/`: `page-list.png`, `page-picked.png`, `page-world-golden.png`, `page-world-java.png`, `page-world-off.png`. ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base feat/shader-pass-times` on ludovics-mac-mini, against feat/shader-pass-times at c3763ff1b, 7 min 57 s) | Check | Result | | --- | --- | | Scope | ✅ 14 files, +281 −37 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (18 s) | | clippy | ✅ (2 min 9 s) | | tests: horizon-client | ✅ 1296 passed (4 min 10 s) | | doc tests | ✅ 0 passed (6 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 112 affected, to run in CI (--quick): ambient_sound, arrow, audio_attributes, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_transformer, breaking_model, camera and 100 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Harnesses (`tools/parity.py --changed origin/main` at 70b832d65; selection by reached items since #1964): **38 passed, 0 failed**. A/B, no pack (paired, alternating, 3 rounds of `horizon-ctl bench 15`, offscreen, same seed and view; the machine was busy, so rounds vary): #2026's head CPU 0.851 / 0.875 / 0.743 ms (mean 0.823), GPU mean 1.673 ms; this PR CPU 0.885 / 0.774 / 0.741 ms (mean 0.800), GPU mean 1.786 ms. Frame p99 11.06 vs 10.78 ms. No cost beyond noise. Without a pick, the page's per-tick work is one string comparison. 🤖 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:13:32 +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#3951
No description provided.