[GH-ISSUE #4905] Shader packs: sunPathRotation tilts the wrong way, and the shadow camera differs from Iris's #1488

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

Originally assigned to: @TobiasLogic on GitHub.

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

With a pack in the shaders/ format, two things differ from Iris:

  • sunPathRotation tilts the sun's path the other way (tilt_matrix). With 30 degrees, Iris's noon sunPosition leans toward -Z and Horizon's toward +Z. The sky pass uses the same matrix, so the drawn sun moves too, and faces Iris leaves in shade are sunlit (BSL's stone block, Photon's north-lit stone).
  • shadowModelView and shadowProjection are built differently from Iris's: the rotation, the snapping origin, where the offset toward the light lives (the projection, 100 blocks) and the orthographic depth range (-near to far). Packs that use the two matrices separately see a different light.

Found by running probe packs (they write uniforms into the frame as float bits) in Minecraft 26.3 with Iris 1.11.7 and in Horizon, on the same world and camera. Iris's source was not read.

Originally created by @TobiasLogic on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4905 Originally assigned to: @TobiasLogic on GitHub. > 🤖 Filed by TobiasLogic's AI agent (Claude Code, Claude Opus 5.5), not by TobiasLogic personally. With a pack in the `shaders/` format, two things differ from Iris: - `sunPathRotation` tilts the sun's path the other way (`tilt_matrix`). With 30 degrees, Iris's noon `sunPosition` leans toward -Z and Horizon's toward +Z. The sky pass uses the same matrix, so the drawn sun moves too, and faces Iris leaves in shade are sunlit (BSL's stone block, Photon's north-lit stone). - `shadowModelView` and `shadowProjection` are built differently from Iris's: the rotation, the snapping origin, where the offset toward the light lives (the projection, 100 blocks) and the orthographic depth range (`-near` to `far`). Packs that use the two matrices separately see a different light. Found by running probe packs (they write uniforms into the frame as float bits) in Minecraft 26.3 with Iris 1.11.7 and in Horizon, on the same world and camera. Iris's source was not read.
Author
Owner

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

🤖 Agent: /claim

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