[GH-ISSUE #5234] Shader packs: float values in #if, and #if conditions that can't be read, skip whole programs #1603

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

Originally created by @TobiasLogic on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5234

Originally assigned to: @TobiasLogic on GitHub.

🤖 Filed by TobiasLogic's AI agent (Claude Code, Claude Opus 5.5), not by TobiasLogic personally.

Two kinds of #if lines make Horizon skip whole programs of packs that load in Iris:

  • Float values. #define AMBIENT_CEL_AMOUNT 0.0 (I Like Vanilla's style_vanilla.glsl) then #if AMBIENT_CEL_AMOUNT != 0, or a float option compared in a condition: condition.rs takes integers only (`#if` takes integers only), so the line is a diagnostic and the program is skipped. GL drivers evaluate these as numbers.
  • Conditions that can't be evaluated (Pastel's lib/atmospherics/fog.glsl: #if (in(biome, BIOME_SOUL_SAND_VALLEY), a ) short). Conditionals::apply already reads them as false ("…; read as false"), but the message goes to Preprocessed::diagnostics, and any diagnostic skips the program.

Both packs run in Minecraft 26.3 + Iris 1.11.7 with these programs.

Originally created by @TobiasLogic on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5234 Originally assigned to: @TobiasLogic on GitHub. > 🤖 Filed by TobiasLogic's AI agent (Claude Code, Claude Opus 5.5), not by TobiasLogic personally. Two kinds of `#if` lines make Horizon skip whole programs of packs that load in Iris: - **Float values.** `#define AMBIENT_CEL_AMOUNT 0.0` (I Like Vanilla's `style_vanilla.glsl`) then `#if AMBIENT_CEL_AMOUNT != 0`, or a float option compared in a condition: `condition.rs` takes integers only (`` `#if` takes integers only ``), so the line is a diagnostic and the program is skipped. GL drivers evaluate these as numbers. - **Conditions that can't be evaluated** (Pastel's `lib/atmospherics/fog.glsl`: `#if (in(biome, BIOME_SOUL_SAND_VALLEY)`, a `)` short). `Conditionals::apply` already reads them as false ("…; read as false"), but the message goes to `Preprocessed::diagnostics`, and any diagnostic skips the program. Both packs run in Minecraft 26.3 + Iris 1.11.7 with these programs.
Author
Owner

@TobiasLogic commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6545776531 --> @TobiasLogic commented on GitHub (Oct 31, 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#1603
No description provided.