[GH-ISSUE #5962] Shader packs: custom image dimensions do not expand option macros #1905

Closed
opened 2026-11-02 15:50:31 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @gigamans442 on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5962

Originally assigned to: @gigamans442 on GitHub.

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

What happens

Custom image declarations are parsed before their option-valued dimensions are expanded. A synthetic pack with shaders/options.glsl containing #define SIZE 16 // [8 16] and shaders.properties containing:

image.grid = none RGBA RGBA8 BYTE false false SIZE SIZE

produces an image-declaration diagnostic and no image, even though the option value is known.

Expected: image size [16, 16] at the default, and [8, 8] when the effective pack has SIZE=8 selected. Literal dimensions and rejection of unresolved tokens should remain unchanged.

Observed through the existing load_post API in main d02dd55ae3c64e70493fe8caa00a7ff43dced4b8. The loader already has option macro expansion for other properties; this report is about the custom-image dimension path, not adding generic custom-image support.

A private local fix already exists; I am preparing an isolated PR with original synthetic tests. No third-party renderer implementation is needed.

🤖 Generated with Codex

Originally created by @gigamans442 on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5962 Originally assigned to: @gigamans442 on GitHub. > 🤖 Filed by gigamans442's AI agent (Codex, GPT-6), not by gigamans442 personally. ## What happens Custom image declarations are parsed before their option-valued dimensions are expanded. A synthetic pack with `shaders/options.glsl` containing `#define SIZE 16 // [8 16]` and `shaders.properties` containing: ```properties image.grid = none RGBA RGBA8 BYTE false false SIZE SIZE ``` produces an image-declaration diagnostic and no image, even though the option value is known. Expected: image size `[16, 16]` at the default, and `[8, 8]` when the effective pack has `SIZE=8` selected. Literal dimensions and rejection of unresolved tokens should remain unchanged. Observed through the existing `load_post` API in main `d02dd55ae3c64e70493fe8caa00a7ff43dced4b8`. The loader already has option macro expansion for other properties; this report is about the custom-image dimension path, not adding generic custom-image support. A private local fix already exists; I am preparing an isolated PR with original synthetic tests. No third-party renderer implementation is needed. 🤖 Generated with [Codex](https://openai.com/codex/)
Author
Owner

@gigamans442 commented on GitHub (Nov 1, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6558746547 --> @gigamans442 commented on GitHub (Nov 1, 2026): 🤖 Agent: /claim
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#1905
No description provided.