[PR #7896] Shader packs: honor dimension.properties program folders #7884

Open
opened 2026-11-03 07:25:59 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7896
Author: @gigamans442
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/shader-named-dimensions-20261102


📝 Commits (2)

  • 82537a9 Honor named shader dimension folders
  • 0ac081b Pin wildcard path and unknown legacy dimension selection

📊 Changes

3 files changed (+154 additions, -7 deletions)

View changed files

📝 crates/horizon-client/src/game/shader_packs.rs (+2 -2)
📝 crates/horizon-shaders/src/lib.rs (+2 -1)
📝 crates/horizon-shaders/src/post.rs (+150 -4)

📄 Description

🤖 Opened by gigamans442's AI agent (Codex, GPT-6.1 Sol), not by gigamans442 personally.

What and why

Packs using dimension.netherShaders = minecraft:the_nether currently load their base shaders in the Nether. Honor dimension.properties mappings and pass the game's namespaced dimension identifier to the resolver. Explicit IDs beat the wildcard; omitted namespaces default to Minecraft; unmapped IDs use the base folder when the mapping file exists. Packs without the file retain their existing worldN selection.

Fixes #7891.

The original memory-zip regression failed on main (31f83499b): expected netherShaders, got the empty base path. It now proves the selected folder reaches load_post and produces the named folder's final program/output target. Further controls cover wildcard ordering, mod namespace matching, legacy fallback and escaping paths. The game's current dimension model contains the three vanilla dimensions; the resolver also accepts arbitrary namespaced IDs.

Kind

  • bug: a crash or a breakage

Vanilla reference

Shader-pack format extension; vanilla does not define it. Public dimension.properties documentation.

Other projects' code

Cross-referenced shader-pack features against Horizon to identify compatibility gaps. Implementation and regression sources are original; this patch follows public file-format documentation and current Horizon source. No external shader implementation or pack asset is copied into this PR.

Self-check

Original production loader regressions passed (2 focused tests). Current head also contains explicit unknown numeric ID, normalized nested wildcard and invalid-path controls. Exact-head CI checks 41549131937 succeeded: verify and launcher passed; parity-related and JFR jobs were skipped.

The local self-check below is preserved verbatim. Its two failures are sandbox socket restrictions: the Python localhost endpoint test and the existing Rust LAN-particle socket test both returned Operation not permitted. Rerunning the affected Python module with normal localhost access passed 24 tests, with one real skip. A scoped local Rust socket/shader follow-up is queued; no successful result is claimed for it yet. This folder-selection regression proves loader/provider behavior; no player game or rendered visual comparison was performed.

pr_ready (tools/pr_ready.py on homepc, against origin/main at 31f83499b, 8 min 36 s)

Check Result
Scope ✅ 3 files, +154 −7
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 614 run, FAILED (errors=1, skipped=1) (45 s)
rustfmt ✅ (10 s)
clippy ✅ (3 min 41 s)
tests: horizon-client, horizon-shaders ❌ 708 passed, 1 failed (3 min 24 s)
doc tests ✅ 0 passed (3 s)
content root tests ➖ content root untouched
mod API up to date ✅ (33 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (no vanilla data here): 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 Codex


🔄 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/7896 **Author:** [@gigamans442](https://github.com/gigamans442) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/shader-named-dimensions-20261102` --- ### 📝 Commits (2) - [`82537a9`](https://github.com/horizon-rust/horizon/commit/82537a9f50579d6ce6078cad3be54335c3aeae26) Honor named shader dimension folders - [`0ac081b`](https://github.com/horizon-rust/horizon/commit/0ac081b5c02e19737da8995b409e4d056040c3f0) Pin wildcard path and unknown legacy dimension selection ### 📊 Changes **3 files changed** (+154 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/shader_packs.rs` (+2 -2) 📝 `crates/horizon-shaders/src/lib.rs` (+2 -1) 📝 `crates/horizon-shaders/src/post.rs` (+150 -4) </details> ### 📄 Description > 🤖 Opened by gigamans442's AI agent (Codex, GPT-6.1 Sol), not by gigamans442 personally. ## What and why Packs using `dimension.netherShaders = minecraft:the_nether` currently load their base shaders in the Nether. Honor `dimension.properties` mappings and pass the game's namespaced dimension identifier to the resolver. Explicit IDs beat the wildcard; omitted namespaces default to Minecraft; unmapped IDs use the base folder when the mapping file exists. Packs without the file retain their existing `worldN` selection. Fixes #7891. The original memory-zip regression failed on main (`31f83499b`): expected `netherShaders`, got the empty base path. It now proves the selected folder reaches `load_post` and produces the named folder's final program/output target. Further controls cover wildcard ordering, mod namespace matching, legacy fallback and escaping paths. The game's current dimension model contains the three vanilla dimensions; the resolver also accepts arbitrary namespaced IDs. ## Kind - [x] bug: a crash or a breakage ## Vanilla reference Shader-pack format extension; vanilla does not define it. [Public dimension.properties documentation](https://shaders.properties/current/reference/miscellaneous/dimension_properties/). ## Other projects' code Cross-referenced shader-pack features against Horizon to identify compatibility gaps. Implementation and regression sources are original; this patch follows public file-format documentation and current Horizon source. No external shader implementation or pack asset is copied into this PR. ## Self-check Original production loader regressions passed (2 focused tests). Current head also contains explicit unknown numeric ID, normalized nested wildcard and invalid-path controls. Exact-head [CI checks 41549131937](https://github.com/horizon-rust/horizon/actions/runs/41549131937) succeeded: verify and launcher passed; parity-related and JFR jobs were skipped. The local self-check below is preserved verbatim. Its two failures are sandbox socket restrictions: the Python localhost endpoint test and the existing Rust LAN-particle socket test both returned `Operation not permitted`. Rerunning the affected Python module with normal localhost access passed 24 tests, with one real skip. A scoped local Rust socket/shader follow-up is queued; no successful result is claimed for it yet. This folder-selection regression proves loader/provider behavior; no player game or rendered visual comparison was performed. **pr_ready** (`tools/pr_ready.py` on homepc, against origin/main at 31f83499b, 8 min 36 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +154 −7 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 614 run, FAILED (errors=1, skipped=1) (45 s) | | rustfmt | ✅ (10 s) | | clippy | ✅ (3 min 41 s) | | tests: horizon-client, horizon-shaders | ❌ 708 passed, 1 failed (3 min 24 s) | | doc tests | ✅ 0 passed (3 s) | | content root tests | ➖ content root untouched | | mod API up to date | ✅ (33 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (no vanilla data here): 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 [Codex](https://openai.com/codex/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#7884
No description provided.