[PR #5980] [MERGED] Expand pack options in custom image dimensions #6591

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

📋 Pull Request Information

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

Base: main ← Head: fix/shader-image-option-macros


📝 Commits (1)

  • 9d0e0a0 Expand shader options in custom image dimensions

📊 Changes

1 file changed (+51 additions, -2 deletions)

View changed files

📝 crates/horizon-shaders/src/post.rs (+51 -2)

📄 Description

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

What and why

Fixes #5962.

Custom image declarations are parsed before option-valued dimensions are expanded, so valid declarations using a known pack option produce no image. Expand those declarations using the existing option macro table, and move that table's existing construction earlier so it is still computed once.

The original macro-dimension regression fails on the unmodified loader. All 95 shader unit tests pass with the fix. Tests check default and chosen dimensions, unchanged literal dimensions, and continued rejection of unresolved names. This does not add generic image support or change shader archives.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

Not vanilla gameplay: standard shader-pack custom-image properties and the pack's existing option expansion. Original synthetic properties/GLSL define the expected image sizes; no external renderer code was used.

Other projects' code

None copied or adapted. The patch changes the existing Horizon MIT implementation and adds original synthetic tests. No Iris, OptiFine or Sodium implementation source was used for this fix.

Self-check

pr_ready (tools/pr_ready.py --base upstream/main on homepc, against upstream/main at d02dd55ae, 2 min 57 s)

Check Result
Scope ✅ 1 files, +51 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 515 passed (36 s)
rustfmt ✅ (8 s)
clippy ✅ (1 min 59 s)
tests: horizon-shaders ✅ 95 passed (15 s)
doc tests ✅ 0 passed
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 (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)

The public-tree history check also passes. The isolated checkout has no prepared vanilla data, so vanilla parity is explicitly left to the affected CI harness selection. No game was launched and no player instance/settings were changed. These are parser/metadata checks, not visual-parity or FPS results.

🤖 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/5980 **Author:** [@gigamans442](https://github.com/gigamans442) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/shader-image-option-macros` --- ### 📝 Commits (1) - [`9d0e0a0`](https://github.com/horizon-rust/horizon/commit/9d0e0a0be5bbe6d0714f2a4bdc1895f1a6a82cea) Expand shader options in custom image dimensions ### 📊 Changes **1 file changed** (+51 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-shaders/src/post.rs` (+51 -2) </details> ### 📄 Description > 🤖 Opened by gigamans442's AI agent (Codex, GPT-6), not by gigamans442 personally. ## What and why Fixes #5962. Custom image declarations are parsed before option-valued dimensions are expanded, so valid declarations using a known pack option produce no image. Expand those declarations using the existing option macro table, and move that table's existing construction earlier so it is still computed once. The original macro-dimension regression fails on the unmodified loader. All 95 shader unit tests pass with the fix. Tests check default and chosen dimensions, unchanged literal dimensions, and continued rejection of unresolved names. This does not add generic image support or change shader archives. ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [x] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference Not vanilla gameplay: standard shader-pack custom-image properties and the pack's existing option expansion. Original synthetic properties/GLSL define the expected image sizes; no external renderer code was used. ## Other projects' code None copied or adapted. The patch changes the existing Horizon MIT implementation and adds original synthetic tests. No Iris, OptiFine or Sodium implementation source was used for this fix. ## Self-check **pr_ready** (`tools/pr_ready.py --base upstream/main` on homepc, against upstream/main at d02dd55ae, 2 min 57 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +51 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 515 passed (36 s) | | rustfmt | ✅ (8 s) | | clippy | ✅ (1 min 59 s) | | tests: horizon-shaders | ✅ 95 passed (15 s) | | doc tests | ✅ 0 passed | | 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 (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) | The public-tree history check also passes. The isolated checkout has no prepared vanilla data, so vanilla parity is explicitly left to the affected CI harness selection. No game was launched and no player instance/settings were changed. These are parser/metadata checks, not visual-parity or FPS results. 🤖 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>
bsakaguchi 2026-11-03 06:23:29 +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#6591
No description provided.