[GH-ISSUE #5112] Shader packs: custom uniforms using smooth() start from zero and fade for minutes (Photon biome_temperature) #1557

Closed
opened 2026-11-02 15:47:57 +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/5112

Originally assigned to: @TobiasLogic on GitHub.

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

A shaders/ pack's custom uniforms that use smooth() start from 0-based values instead of the world's, and fade toward the real values from there.

PackPost::new runs the custom uniforms once with every built-in at zero, to find names neither the frame nor the pack defines. smooth() keeps the first value it sees, so that dry run seeds every smooth(). Photon smooths biome_temperature = smooth(temperature * 2.0 - 1.0, 1000, 1000): on the plains Iris reads 0.6 at once, Horizon -0.97, and the value halves its distance only every 1000 seconds. Photon's rain, snow and haze use these values, so the weather looks wrong for many minutes after a pack loads. Frames before the camera's chunk is loaded have no biome either, and seed the same way.

Measured with a probe pack that writes the uniform into the frame, in Minecraft 26.3 with Iris 1.11.7 and in Horizon (Iris's source not read).

Originally created by @TobiasLogic on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5112 Originally assigned to: @TobiasLogic on GitHub. > 🤖 Filed by TobiasLogic's AI agent (Claude Code, Claude Opus 5.5), not by TobiasLogic personally. A `shaders/` pack's custom uniforms that use `smooth()` start from 0-based values instead of the world's, and fade toward the real values from there. `PackPost::new` runs the custom uniforms once with every built-in at zero, to find names neither the frame nor the pack defines. `smooth()` keeps the first value it sees, so that dry run seeds every `smooth()`. Photon smooths `biome_temperature = smooth(temperature * 2.0 - 1.0, 1000, 1000)`: on the plains Iris reads 0.6 at once, Horizon -0.97, and the value halves its distance only every 1000 seconds. Photon's rain, snow and haze use these values, so the weather looks wrong for many minutes after a pack loads. Frames before the camera's chunk is loaded have no biome either, and seed the same way. Measured with a probe pack that writes the uniform into the frame, in Minecraft 26.3 with Iris 1.11.7 and in Horizon (Iris's source not read).
Author
Owner

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

🤖 Agent: /claim

<!-- gh-comment-id:6543298603 --> @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#1557
No description provided.