[PR #5652] [MERGED] Shader packs: [[pages]], the layout of a Horizon pack's options page #6419

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

📋 Pull Request Information

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

Base: main ← Head: shader/pack-pages


📝 Commits (10+)

  • 3ab39ea Merge remote-tracking branch 'origin/main' into shader/s8-shadow-entities
  • b1d6819 Native mods: the screen hears of the wheel before it scrolls
  • 43207a5 Shader API: entities cast into the shadow map
  • c901615 Merge branch 'screen-mouse-button' into screen-mouse-scrolled
  • 11cd3f2 Shader API: the first-person player casts into the shadow map
  • bbbb185 Shader API: materials, an id by sprite, and shadows cut whole
  • 622786d Shader packs: pages, the layout of a Horizon pack's options page
  • fbf8c46 Shader API: [sky] clouds, sun and stars, for a sky that draws its own
  • e26bd0f feat(mods): native mods use items over time (duration, animation, can eat, start and finish)
  • 753c565 Shader API: the blob stays where a pack has no sun to cast with

📊 Changes

79 files changed (+3074 additions, -416 deletions)

View changed files

📝 crates/horizon-client-render/src/containers.rs (+62 -0)
📝 crates/horizon-client-render/src/fast_hash.rs (+3 -85)
📝 crates/horizon-client-render/src/gfx.rs (+59 -13)
📝 crates/horizon-client-render/src/gfx/entity_batch.rs (+5 -0)
📝 crates/horizon-client-render/src/gfx/native_material.rs (+49 -19)
📝 crates/horizon-client-render/src/gfx/native_pack.rs (+16 -2)
📝 crates/horizon-client-render/src/gfx/native_shadow.rs (+180 -8)
📝 crates/horizon-client-render/src/graphics.rs (+10 -1)
📝 crates/horizon-client-render/src/options_ui.rs (+117 -44)
📝 crates/horizon-client-render/src/shader_pack_list.rs (+9 -3)
📝 crates/horizon-client-render/src/sprites.rs (+41 -7)
📝 crates/horizon-client-render/src/streaming.rs (+13 -4)
📝 crates/horizon-client/src/content_identity.rs (+31 -3)
📝 crates/horizon-client/src/entity_nbt.rs (+42 -2)
📝 crates/horizon-client/src/game.rs (+118 -41)
📝 crates/horizon-client/src/game/chat.rs (+3 -0)
📝 crates/horizon-client/src/game/commands.rs (+25 -11)
📝 crates/horizon-client/src/game/crossbow.rs (+2 -4)
📝 crates/horizon-client/src/game/end.rs (+1 -3)
📝 crates/horizon-client/src/game/entity_culling.rs (+3 -0)

...and 59 more files

📄 Description

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

Closes #5651.

Its base, #5626, has landed, and main is merged in, so the diff here is only this change.

What

  • [[pages]]: id, name, optional description (the tooltip of buttons opening the page), columns (1 or 2, default 2) and items: an option's id, "page:<id>", or "" for an empty slot. At most 32 pages of 64 items.
  • The Shader Options button opens the first page. A page past the first has its own name as the title.
  • Without [[pages]], the screen stays the flat list from #5626.
  • The check refuses unknown ids, a page linking to itself, an item twice on a page, a page that can't be reached from the first, and an option on no page that can be reached.

Proof

Tests: reads_settings_pages_and_refuses_broken_links covers parsing and each refusal; a_horizon_packs_options_step_both_ways_from_the_picked_packs_button clicks through the first page to the second, steps the option both ways, resets it, and goes back.

In game on Linux (RTX 3050 Ti), single player, with a throwaway pack with two pages and one red option, driving the real screen with horizon-ctl ui and click:

  • Shader Packs: picking the pack brought up Shader Options...; that opened the first page, and Colour... opened the second, with the option on it.
  • Clicks went Red: 0.0 to 0.5 to 1.0, a right click back to 0.5. shaderpacks/stack_proof.txt followed: red=0.5, red=1, red=0.5.
  • Reset put it at Red: 0.0 and removed the file.
  • The log shows the pack rebuilt after each change. A screenshot of the blurred world behind the page averaged 51,51,51 at 0 and 103,51,51 at 1.

Shift-click is only in the test: horizon-ctl click doesn't pass shift to this screen. Not run: lan_e2e (client-only settings) 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 0fefb3744, 2 min 32 s)

Check Result
Scope ✅ 7 files, +385 −49
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 511 passed (32 s)
rustfmt ✅ (7 s)
clippy ✅ (1 min 19 s)
tests: horizon-client-render, horizon-shader-api ✅ 850 passed (33 s)
doc tests ✅ 0 passed (1 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/5652 **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-pages` --- ### 📝 Commits (10+) - [`3ab39ea`](https://github.com/horizon-rust/horizon/commit/3ab39ea98415cf91cbf58af324e3afcc87f8260c) Merge remote-tracking branch 'origin/main' into shader/s8-shadow-entities - [`b1d6819`](https://github.com/horizon-rust/horizon/commit/b1d6819737cabae0cda4c11268d1dfc9954cb652) Native mods: the screen hears of the wheel before it scrolls - [`43207a5`](https://github.com/horizon-rust/horizon/commit/43207a5a3d6afeee0061ed6aef9c68dcd0ce8d24) Shader API: entities cast into the shadow map - [`c901615`](https://github.com/horizon-rust/horizon/commit/c90161511b9404e22911a177208490b058d15e0f) Merge branch 'screen-mouse-button' into screen-mouse-scrolled - [`11cd3f2`](https://github.com/horizon-rust/horizon/commit/11cd3f220d91b1b99febea60ce035150bd8996b8) Shader API: the first-person player casts into the shadow map - [`bbbb185`](https://github.com/horizon-rust/horizon/commit/bbbb18595fdb024b76a7dda8e78a2ce92c7ad0dc) Shader API: [[materials]], an id by sprite, and shadows cut whole - [`622786d`](https://github.com/horizon-rust/horizon/commit/622786d90317822ff09249426417b3af4a8ef9f2) Shader packs: [[pages]], the layout of a Horizon pack's options page - [`fbf8c46`](https://github.com/horizon-rust/horizon/commit/fbf8c46b8e6834bf3faf0885ddc9718a421f5b41) Shader API: [sky] clouds, sun and stars, for a sky that draws its own - [`e26bd0f`](https://github.com/horizon-rust/horizon/commit/e26bd0fe58f0cb465b60f7bc5712fb5a08ca5507) feat(mods): native mods use items over time (duration, animation, can eat, start and finish) - [`753c565`](https://github.com/horizon-rust/horizon/commit/753c565883ce75bbfd9624ad53ed0de157a0c59b) Shader API: the blob stays where a pack has no sun to cast with ### 📊 Changes **79 files changed** (+3074 additions, -416 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/containers.rs` (+62 -0) 📝 `crates/horizon-client-render/src/fast_hash.rs` (+3 -85) 📝 `crates/horizon-client-render/src/gfx.rs` (+59 -13) 📝 `crates/horizon-client-render/src/gfx/entity_batch.rs` (+5 -0) 📝 `crates/horizon-client-render/src/gfx/native_material.rs` (+49 -19) 📝 `crates/horizon-client-render/src/gfx/native_pack.rs` (+16 -2) 📝 `crates/horizon-client-render/src/gfx/native_shadow.rs` (+180 -8) 📝 `crates/horizon-client-render/src/graphics.rs` (+10 -1) 📝 `crates/horizon-client-render/src/options_ui.rs` (+117 -44) 📝 `crates/horizon-client-render/src/shader_pack_list.rs` (+9 -3) 📝 `crates/horizon-client-render/src/sprites.rs` (+41 -7) 📝 `crates/horizon-client-render/src/streaming.rs` (+13 -4) 📝 `crates/horizon-client/src/content_identity.rs` (+31 -3) 📝 `crates/horizon-client/src/entity_nbt.rs` (+42 -2) 📝 `crates/horizon-client/src/game.rs` (+118 -41) 📝 `crates/horizon-client/src/game/chat.rs` (+3 -0) 📝 `crates/horizon-client/src/game/commands.rs` (+25 -11) 📝 `crates/horizon-client/src/game/crossbow.rs` (+2 -4) 📝 `crates/horizon-client/src/game/end.rs` (+1 -3) 📝 `crates/horizon-client/src/game/entity_culling.rs` (+3 -0) _...and 59 more files_ </details> ### 📄 Description > 🤖 Opened by Teiwazik's AI agent (Claude Code, Claude Opus 5.5), not by Teiwazik personally. Closes #5651. Its base, #5626, has landed, and `main` is merged in, so the diff here is only this change. ## What - `[[pages]]`: `id`, `name`, optional `description` (the tooltip of buttons opening the page), `columns` (1 or 2, default 2) and `items`: an option's id, `"page:<id>"`, or `""` for an empty slot. At most 32 pages of 64 items. - The Shader Options button opens the first page. A page past the first has its own name as the title. - Without `[[pages]]`, the screen stays the flat list from #5626. - The check refuses unknown ids, a page linking to itself, an item twice on a page, a page that can't be reached from the first, and an option on no page that can be reached. ## Proof Tests: `reads_settings_pages_and_refuses_broken_links` covers parsing and each refusal; `a_horizon_packs_options_step_both_ways_from_the_picked_packs_button` clicks through the first page to the second, steps the option both ways, resets it, and goes back. In game on Linux (RTX 3050 Ti), single player, with a throwaway pack with two pages and one `red` option, driving the real screen with `horizon-ctl ui` and `click`: - Shader Packs: picking the pack brought up Shader Options...; that opened the first page, and `Colour...` opened the second, with the option on it. - Clicks went `Red: 0.0` to `0.5` to `1.0`, a right click back to `0.5`. `shaderpacks/stack_proof.txt` followed: `red=0.5`, `red=1`, `red=0.5`. - Reset put it at `Red: 0.0` and removed the file. - The log shows the pack rebuilt after each change. A screenshot of the blurred world behind the page averaged `51,51,51` at 0 and `103,51,51` at 1. Shift-click is only in the test: `horizon-ctl click` doesn't pass shift to this screen. Not run: `lan_e2e` (client-only settings) 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 0fefb3744, 2 min 32 s) | Check | Result | | --- | --- | | Scope | ✅ 7 files, +385 −49 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 511 passed (32 s) | | rustfmt | ✅ (7 s) | | clippy | ✅ (1 min 19 s) | | tests: horizon-client-render, horizon-shader-api | ✅ 850 passed (33 s) | | doc tests | ✅ 0 passed (1 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:20:16 +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#6419
No description provided.