[PR #4791] [MERGED] Shader Options: sliders, and const bool options #5854

Closed
opened 2026-11-03 05:15:27 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4791
Author: @PzmuV1517
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: shader-packs/14


📝 Commits (10+)

  • 0bfcf5f Shader packs: shadow.culling, voxelDistance and geometry stage writes once per triangle
  • 63bd8e0 Shader packs: a device without compute, storage writes or clear_texture skips what needs them
  • fcd2161 Shader packs: atomic functions on a component of a shared integer vector
  • 9d410bc Shader packs: colortex buffers bound as images can take atomics
  • 8538201 Shader packs: struct fields and array elements passed as out arguments no longer crash Vulkan
  • 6e385e7 Shader packs: Iris's camera uniforms
  • 92b62f0 Shader packs: translate geometry stages of terrain's shadow program
  • 60d3a67 Shader packs: draw geometry stages, and what Rethinking Voxels needed
  • 053f5b8 Shader packs: compute programs see the order their packs were written for
  • 49500aa Shader packs: gl_WorkGroupSize is the program's local size

📊 Changes

35 files changed (+4036 additions, -124 deletions)

View changed files

📝 crates/horizon-client-render/src/camera.rs (+8 -0)
📝 crates/horizon-client-render/src/gfx.rs (+73 -12)
📝 crates/horizon-client-render/src/gfx/flat.rs (+17 -0)
📝 crates/horizon-client-render/src/gfx/pack_atlas.rs (+17 -0)
📝 crates/horizon-client-render/src/gfx/pack_images.rs (+249 -27)
📝 crates/horizon-client-render/src/gfx/pack_post.rs (+338 -22)
📝 crates/horizon-client-render/src/gfx/pack_uniforms.rs (+43 -4)
📝 crates/horizon-client-render/src/lib.rs (+1 -0)
📝 crates/horizon-client-render/src/options_ui.rs (+236 -7)
📝 crates/horizon-client-render/src/settings.rs (+4 -0)
➕ crates/horizon-client-render/src/shader_options.rs (+299 -0)
📝 crates/horizon-client/assets/horizon/lang/en_us.json (+4 -0)
📝 crates/horizon-client/src/game.rs (+12 -0)
📝 crates/horizon-client/src/game/options.rs (+2 -0)
📝 crates/horizon-client/src/game/shader_packs.rs (+78 -2)
📝 crates/horizon-client/src/game/startup_menu.rs (+12 -0)
📝 crates/horizon-client/src/lib.rs (+4 -4)
📝 crates/horizon-shaders/Cargo.toml (+4 -0)
📝 crates/horizon-shaders/src/config.rs (+4 -0)
📝 crates/horizon-shaders/src/lang.rs (+1 -1)

...and 15 more files

📄 Description

More of the Shader Options page. It builds on #4790: review only the commits below.

  • 14284620a Shader Options: sliders, and const bool options
  • f2d68b69a Shader Options: a held slider's handle follows the pointer

What and why

sliders, and const bool options (14284620a)

The options a pack lists in sliders are sliders, each step one of the option's values. const
bool declarations (const bool shadowHardwareFiltering = true;) are switches too; as they are
as often the pack's own settings, they show where a screen names them, not with *.

a held slider's handle follows the pointer (f2d68b69a)

Clean room

Written from the format's public user documentation (screen, sliders, profile and lang keys) and from reading Photon's and Rethinking Voxels' own shaders.properties and lang files; no Iris or OptiFine code.

Vanilla reference

Horizon-only: vanilla has no shader packs. Nothing changes unless a pack is selected.

Self-check

pr_ready (tools/pr_ready.py --quick on Mac, against origin/main at 27cb8f96b, 2 min 18 s)

Check Result
Scope ⚠️ 200 files, +127834 −325; 127842 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ changes with a Cargo.toml
Public tree ✅
Python tests ✅ 495 passed (25 s)
rustfmt ✅ (4 s)
Rust ⚠️ 1.98.1 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with rustup update
clippy ✅ (31 s)
tests: workspace ❌ 2190 passed, 1 failed (50 s)
doc tests ✅ 0 passed (4 s)
content root tests ✅ 7 passed (19 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅
launcher tests ❌ 315 passed, 1 failed (4 s)
Parity ➖ 359 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 347 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Failures that aren't from this stack:

  • The horizon-port-pack resource pack tests and the launcher's modpacks::tests::resource_only_profile_can_play_without_enabling_or_overwriting_packs fail with "/var: not an ordinary directory" on macOS, where /var is a symlink. The resource pack tests fail the same way on main itself, and this stack changes neither horizon-port-pack nor the launcher.
  • gfx::frame_gen::optical_flow::tests::finds_a_shift_and_a_scene_change is main's and fails now and then in a full run on this machine, on main too (1 of 5 runs); nothing here touches it. When it fails first, cargo stops before the horizon-port-pack tests.

Tested in the game

Photon v1.4 in a fresh home: Post-Processing shows Bloom Intensity, Bloom Spread, DoF Intensity, DoF Samples and Motion Blur Intensity as sliders; horizon-ctl set on Bloom Intensity at 1.0 wrote BLOOM_INTENSITY=2.00 and reloaded the pack.


🔄 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/4791 **Author:** [@PzmuV1517](https://github.com/PzmuV1517) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `shader-packs/14` --- ### 📝 Commits (10+) - [`0bfcf5f`](https://github.com/horizon-rust/horizon/commit/0bfcf5f954ff1bc45d409e7e44a1362304f62d79) Shader packs: shadow.culling, voxelDistance and geometry stage writes once per triangle - [`63bd8e0`](https://github.com/horizon-rust/horizon/commit/63bd8e04747c7647778bed3fb78f1e5685ffa361) Shader packs: a device without compute, storage writes or clear_texture skips what needs them - [`fcd2161`](https://github.com/horizon-rust/horizon/commit/fcd21612876425d80f0b2a4753a971e5653f503e) Shader packs: atomic functions on a component of a shared integer vector - [`9d410bc`](https://github.com/horizon-rust/horizon/commit/9d410bc31fc3b53ee295a3132853415bf02561c7) Shader packs: colortex buffers bound as images can take atomics - [`8538201`](https://github.com/horizon-rust/horizon/commit/85382019cfb09c25ecc4835dd12ce0ca07c25f30) Shader packs: struct fields and array elements passed as out arguments no longer crash Vulkan - [`6e385e7`](https://github.com/horizon-rust/horizon/commit/6e385e741f4e389f611cc9c20c4e435e29e54c50) Shader packs: Iris's camera uniforms - [`92b62f0`](https://github.com/horizon-rust/horizon/commit/92b62f0f0ee9af9902f770b0e6df642ce668675c) Shader packs: translate geometry stages of terrain's shadow program - [`60d3a67`](https://github.com/horizon-rust/horizon/commit/60d3a679bc1d5d0d5905680736de76b7c02185c0) Shader packs: draw geometry stages, and what Rethinking Voxels needed - [`053f5b8`](https://github.com/horizon-rust/horizon/commit/053f5b8714e7cd14b2b19ee8213c36df60bd44c9) Shader packs: compute programs see the order their packs were written for - [`49500aa`](https://github.com/horizon-rust/horizon/commit/49500aacd2e4e0593f453b04d6b4d639c409f50e) Shader packs: gl_WorkGroupSize is the program's local size ### 📊 Changes **35 files changed** (+4036 additions, -124 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/camera.rs` (+8 -0) 📝 `crates/horizon-client-render/src/gfx.rs` (+73 -12) 📝 `crates/horizon-client-render/src/gfx/flat.rs` (+17 -0) 📝 `crates/horizon-client-render/src/gfx/pack_atlas.rs` (+17 -0) 📝 `crates/horizon-client-render/src/gfx/pack_images.rs` (+249 -27) 📝 `crates/horizon-client-render/src/gfx/pack_post.rs` (+338 -22) 📝 `crates/horizon-client-render/src/gfx/pack_uniforms.rs` (+43 -4) 📝 `crates/horizon-client-render/src/lib.rs` (+1 -0) 📝 `crates/horizon-client-render/src/options_ui.rs` (+236 -7) 📝 `crates/horizon-client-render/src/settings.rs` (+4 -0) ➕ `crates/horizon-client-render/src/shader_options.rs` (+299 -0) 📝 `crates/horizon-client/assets/horizon/lang/en_us.json` (+4 -0) 📝 `crates/horizon-client/src/game.rs` (+12 -0) 📝 `crates/horizon-client/src/game/options.rs` (+2 -0) 📝 `crates/horizon-client/src/game/shader_packs.rs` (+78 -2) 📝 `crates/horizon-client/src/game/startup_menu.rs` (+12 -0) 📝 `crates/horizon-client/src/lib.rs` (+4 -4) 📝 `crates/horizon-shaders/Cargo.toml` (+4 -0) 📝 `crates/horizon-shaders/src/config.rs` (+4 -0) 📝 `crates/horizon-shaders/src/lang.rs` (+1 -1) _...and 15 more files_ </details> ### 📄 Description More of the Shader Options page. It builds on #4790: review only the commits below. - `14284620a` Shader Options: sliders, and const bool options - `f2d68b69a` Shader Options: a held slider's handle follows the pointer ## What and why **sliders, and const bool options** (`14284620a`) The options a pack lists in sliders are sliders, each step one of the option's values. const bool declarations (const bool shadowHardwareFiltering = true;) are switches too; as they are as often the pack's own settings, they show where a screen names them, not with *. **a held slider's handle follows the pointer** (`f2d68b69a`) ## Clean room Written from the format's public user documentation (screen, sliders, profile and lang keys) and from reading Photon's and Rethinking Voxels' own shaders.properties and lang files; no Iris or OptiFine code. ## Vanilla reference Horizon-only: vanilla has no shader packs. Nothing changes unless a pack is selected. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on Mac, against origin/main at 27cb8f96b, 2 min 18 s) | Check | Result | | --- | --- | | Scope | ⚠️ 200 files, +127834 −325; 127842 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ changes with a Cargo.toml | | Public tree | ✅ | | Python tests | ✅ 495 passed (25 s) | | rustfmt | ✅ (4 s) | | Rust | ⚠️ 1.98.1 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with `rustup update` | | clippy | ✅ (31 s) | | tests: workspace | ❌ 2190 passed, 1 failed (50 s) | | doc tests | ✅ 0 passed (4 s) | | content root tests | ✅ 7 passed (19 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ | | launcher tests | ❌ 315 passed, 1 failed (4 s) | | Parity | ➖ 359 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 347 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Failures that aren't from this stack: - The `horizon-port-pack` resource pack tests and the launcher's `modpacks::tests::resource_only_profile_can_play_without_enabling_or_overwriting_packs` fail with "/var: not an ordinary directory" on macOS, where `/var` is a symlink. The resource pack tests fail the same way on main itself, and this stack changes neither `horizon-port-pack` nor the launcher. - `gfx::frame_gen::optical_flow::tests::finds_a_shift_and_a_scene_change` is main's and fails now and then in a full run on this machine, on main too (1 of 5 runs); nothing here touches it. When it fails first, cargo stops before the `horizon-port-pack` tests. ## Tested in the game Photon v1.4 in a fresh home: Post-Processing shows Bloom Intensity, Bloom Spread, DoF Intensity, DoF Samples and Motion Blur Intensity as sliders; `horizon-ctl set` on Bloom Intensity at 1.0 wrote `BLOOM_INTENSITY=2.00` and reloaded the pack. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:15:27 +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#5854
No description provided.