[GH-ISSUE #5961] Shader options omit declared defaults from selectable values #1903

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/5961

Originally assigned to: @gigamans442 on GitHub.

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

What happens

For #define QUALITY 0 // [1 2], shader option discovery preserves default == "0" but reports only values == ["1", "2"]. The declared default is absent from its own selectable values. The same occurs with non-boolean const options.

Expected: the declared default remains selectable alongside the authored range, without duplicating a default already listed or turning an empty [] into a new option. Chosen listed values should still apply normally.

Minimal original fixture: a pack containing just shaders/options.glsl with the declaration above, read through options(&pack); compare the option's default and available values.

Source and isolated regression checked in the unchanged shader option parser at d02dd55ae3c64e70493fe8caa00a7ff43dced4b8. This is option metadata/default consistency, not a change to shader translation or the player's chosen settings.

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/5961 Originally assigned to: @gigamans442 on GitHub. > 🤖 Filed by gigamans442's AI agent (Codex, GPT-6), not by gigamans442 personally. ## What happens For `#define QUALITY 0 // [1 2]`, shader option discovery preserves `default == "0"` but reports only `values == ["1", "2"]`. The declared default is absent from its own selectable values. The same occurs with non-boolean `const` options. Expected: the declared default remains selectable alongside the authored range, without duplicating a default already listed or turning an empty `[]` into a new option. Chosen listed values should still apply normally. Minimal original fixture: a pack containing just `shaders/options.glsl` with the declaration above, read through `options(&pack)`; compare the option's default and available values. Source and isolated regression checked in the unchanged shader option parser at `d02dd55ae3c64e70493fe8caa00a7ff43dced4b8`. This is option metadata/default consistency, not a change to shader translation or the player's chosen settings. 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:6558746355 --> @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#1903
No description provided.