[PR #5626] [MERGED] Shader packs: a Shader Options page for a Horizon pack's [[options]] #6396

Closed
opened 2026-11-03 06:19:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5626
Author: @Teiwazik
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: shader/pack-settings


📝 Commits (1)

  • 5cc2d09 Shader packs: a Shader Options page for a Horizon pack's options

📊 Changes

6 files changed (+395 additions, -18 deletions)

View changed files

📝 crates/horizon-client-render/src/options_ui.rs (+154 -7)
📝 crates/horizon-client-render/src/shader_pack_list.rs (+215 -3)
📝 crates/horizon-client/src/game/native_shaders.rs (+11 -8)
📝 crates/horizon-client/src/game/options.rs (+5 -0)
📝 crates/horizon-client/src/game/startup_menu.rs (+5 -0)
📝 docs/shaders.md (+5 -0)

📄 Description

🤖 Opened by Teiwazik's AI agent (Claude Code, Claude Opus 5.5), not by Teiwazik personally.

Closes #5625.

Based on main, independent of the shadow stack (#5461, #5476, #5590, #5619). The only expected overlap with #5619 is a few lines in native_shaders.rs.

What

  • A picked Horizon pack with options gets the Shader Options... button a shaders/ pack already has, and a page listing its options two a row.
  • A click picks the next value, a right click the one before, shift-click the default, Reset all of them. Hovering an option shows its description.
  • Each change saves to shaderpacks/<pack>.txt (id=value lines, values at their defaults left out, and no file when none are left), the same file name shaders/ packs use. A saved value out of range is brought into range when read.
  • The pack's change detection also covers that file, so the pack reloads within half a second of a change, including its "reloaded" chat line.

Value labels are the pack's own text, except On/Off, which use options.on and options.off. No new language keys.

Proof

  • Tests: a_horizon_packs_options_step_both_ways_from_the_picked_packs_button drives the page through click; values_step_wrap_and_round_trip covers stepping and the file.
  • In game on Linux (RTX 3050 Ti), single player, with a throwaway pack whose red option adds to the red channel. I changed the value by writing and removing the values file while the game ran. Average colour of the floor in the screenshots: 108,103,103 at the default (chat overlaps that area in this shot), 214,107,107 with red=1, 120,120,120 with the file removed. The log shows the pack rebuilt each time, in 83 ms and 7 ms, and chat showed "Shader pack Options Proof reloaded".

Not checked in game: clicking through the page itself; only the test above drives it. Not run: lan_e2e (client-only settings, nothing on the wire) and the parity harnesses. No screenshots attached: they'd have to be committed to upload, and they show Mojang textures.

pr_ready (tools/pr_ready.py --quick on teiwazik-laptop, against origin/main at 74698584e, 8 min 2 s)

Check Result
Scope ✅ 6 files, +395 −18
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 510 passed (36 s)
rustfmt ✅ (8 s)
clippy ✅ (1 min 15 s)
tests: horizon-client, horizon-client-render ✅ 2398 passed (6 min 0 s)
doc tests ✅ 0 passed (3 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)

🤖 Generated with Claude Code

https://claude.ai/code/session_01EBqm1v5zTsDGwuZF6XKFjL


🔄 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/5626 **Author:** [@Teiwazik](https://github.com/Teiwazik) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `shader/pack-settings` --- ### 📝 Commits (1) - [`5cc2d09`](https://github.com/horizon-rust/horizon/commit/5cc2d09d5cf263cae985110458cddc44e47f031d) Shader packs: a Shader Options page for a Horizon pack's [[options]] ### 📊 Changes **6 files changed** (+395 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/options_ui.rs` (+154 -7) 📝 `crates/horizon-client-render/src/shader_pack_list.rs` (+215 -3) 📝 `crates/horizon-client/src/game/native_shaders.rs` (+11 -8) 📝 `crates/horizon-client/src/game/options.rs` (+5 -0) 📝 `crates/horizon-client/src/game/startup_menu.rs` (+5 -0) 📝 `docs/shaders.md` (+5 -0) </details> ### 📄 Description > 🤖 Opened by Teiwazik's AI agent (Claude Code, Claude Opus 5.5), not by Teiwazik personally. Closes #5625. Based on `main`, independent of the shadow stack (#5461, #5476, #5590, #5619). The only expected overlap with #5619 is a few lines in `native_shaders.rs`. ## What - A picked Horizon pack with options gets the Shader Options... button a `shaders/` pack already has, and a page listing its options two a row. - A click picks the next value, a right click the one before, shift-click the default, Reset all of them. Hovering an option shows its `description`. - Each change saves to `shaderpacks/<pack>.txt` (`id=value` lines, values at their defaults left out, and no file when none are left), the same file name `shaders/` packs use. A saved value out of range is brought into range when read. - The pack's change detection also covers that file, so the pack reloads within half a second of a change, including its "reloaded" chat line. Value labels are the pack's own text, except On/Off, which use `options.on` and `options.off`. No new language keys. ## Proof - Tests: `a_horizon_packs_options_step_both_ways_from_the_picked_packs_button` drives the page through `click`; `values_step_wrap_and_round_trip` covers stepping and the file. - In game on Linux (RTX 3050 Ti), single player, with a throwaway pack whose `red` option adds to the red channel. I changed the value by writing and removing the values file while the game ran. Average colour of the floor in the screenshots: `108,103,103` at the default (chat overlaps that area in this shot), `214,107,107` with `red=1`, `120,120,120` with the file removed. The log shows the pack rebuilt each time, in 83 ms and 7 ms, and chat showed "Shader pack Options Proof reloaded". Not checked in game: clicking through the page itself; only the test above drives it. Not run: `lan_e2e` (client-only settings, nothing on the wire) and the parity harnesses. No screenshots attached: they'd have to be committed to upload, and they show Mojang textures. **pr_ready** (`tools/pr_ready.py --quick` on teiwazik-laptop, against origin/main at 74698584e, 8 min 2 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +395 −18 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 510 passed (36 s) | | rustfmt | ✅ (8 s) | | clippy | ✅ (1 min 15 s) | | tests: horizon-client, horizon-client-render | ✅ 2398 passed (6 min 0 s) | | doc tests | ✅ 0 passed (3 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) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EBqm1v5zTsDGwuZF6XKFjL --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:19:54 +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#6396
No description provided.