[PR #5232] [MERGED] Shader packs: the sky's and clouds' light and normals, and blockEntityId, as Iris gives them #6154

Closed
opened 2026-11-03 06:14:59 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5232
Author: @TobiasLogic
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: shaderpacks/sky-cloud-attributes


📝 Commits (1)

  • 70f8a8a Shader packs: the sky's and clouds' light and normals, and blockEntityId, as Iris gives them

📊 Changes

4 files changed (+49 additions, -17 deletions)

View changed files

📝 crates/horizon-client-render/src/clouds.rs (+41 -11)
📝 crates/horizon-client-render/src/gfx/pack_draw.rs (+2 -0)
📝 crates/horizon-client-render/src/gfx/pack_entities.rs (+3 -3)
📝 crates/horizon-client-render/src/gfx/pack_sky.rs (+3 -3)

📄 Description

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

What and why

Fixes #5231.

Five values a shaders/ pack reads differed from Iris's (measured with a probe pack, see the issue):

  • pack_sky::inputs and celestial_inputs, pack_entities::cloud_inputs: lightmap coordinates (240, 240), full block and sky light, instead of (0, 240); vaUV2 the same for clouds.
  • pack_sky::inputs: the sky's normal is (0, 0, 1), as the sun and moon's already was.
  • clouds::Mesh: each cloud face carries its normal (w 0, so entity.wgsl keeps the game's own clouds shaded by their colour as before); cloud_inputs already reads it, so packs now get (0, -1, 0) under a cloud and the side's direction on its sides. Faces seen from inside flip it with their winding.
  • DrawUniforms::new: every slot starts with blockEntityId -1 (block entity runs still write theirs).

Read back with the probe pack (superflat world, same camera), samples per program:

Iris 1.11.7 Horizon main This PR
gbuffers_skybasic (lightmap, normal) (240, 240), (0, 0, 1) (0, 240), (0, 1, 0) (240, 240), (0, 0, 1)
gbuffers_clouds lightmap (240, 240) (0, 240) (240, 240)
gbuffers_clouds normals (0, -1, 0) ×43, (0, 0, -1) ×14 (0, 1, 0) ×57 (0, -1, 0) ×43, (0, 0, -1) ×12, (-1, 0, 0) ×2
terrain blockEntityId -1 0 -1

(The clouds drift between the two games' frames, so a couple of samples land on another side.)

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

Not vanilla: the shaders/ pack format's vertex inputs and blockEntityId. The reference is Iris 1.11.7 on Minecraft 26.3, run and observed with a probe pack (no source read). Without a pack nothing changes (the cloud normals' w is 0).

Self-check

pr_ready (tools/pr_ready.py --quick on 6cd182588f2d, against origin/main at d55e66d65, 4 min 48 s)

Check Result
Scope ✅ 4 files, +49 −17
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ❌ 495 run, FAILED (errors=4) (2 min 21 s)
rustfmt ✅ (24 s)
clippy ✅ (1 min 8 s)
tests: horizon-client-render ✅ 707 passed (52 s)
doc tests ✅ 0 passed (1 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Run on a rented Linux box with GPU tests on lavapipe. The 4 Python errors are that box's git 2.34 (git merge-tree --write-tree, in test_nightly_set and test_supervise); they pass with git 2.55.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/5232 **Author:** [@TobiasLogic](https://github.com/TobiasLogic) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `shaderpacks/sky-cloud-attributes` --- ### 📝 Commits (1) - [`70f8a8a`](https://github.com/horizon-rust/horizon/commit/70f8a8ab4e3dc6f86bc7077317d5e9a12feab6a1) Shader packs: the sky's and clouds' light and normals, and blockEntityId, as Iris gives them ### 📊 Changes **4 files changed** (+49 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/clouds.rs` (+41 -11) 📝 `crates/horizon-client-render/src/gfx/pack_draw.rs` (+2 -0) 📝 `crates/horizon-client-render/src/gfx/pack_entities.rs` (+3 -3) 📝 `crates/horizon-client-render/src/gfx/pack_sky.rs` (+3 -3) </details> ### 📄 Description > 🤖 Opened by TobiasLogic's AI agent (Claude Code, Claude Opus 5.5), not by TobiasLogic personally. ## What and why Fixes #5231. Five values a `shaders/` pack reads differed from Iris's (measured with a probe pack, see the issue): - `pack_sky::inputs` and `celestial_inputs`, `pack_entities::cloud_inputs`: lightmap coordinates (240, 240), full block and sky light, instead of (0, 240); `vaUV2` the same for clouds. - `pack_sky::inputs`: the sky's normal is (0, 0, 1), as the sun and moon's already was. - `clouds::Mesh`: each cloud face carries its normal (`w` 0, so `entity.wgsl` keeps the game's own clouds shaded by their colour as before); `cloud_inputs` already reads it, so packs now get (0, -1, 0) under a cloud and the side's direction on its sides. Faces seen from inside flip it with their winding. - `DrawUniforms::new`: every slot starts with `blockEntityId` -1 (block entity runs still write theirs). Read back with the probe pack (superflat world, same camera), samples per program: | | Iris 1.11.7 | Horizon main | This PR | | --- | --- | --- | --- | | `gbuffers_skybasic` (lightmap, normal) | (240, 240), (0, 0, 1) | (0, 240), (0, 1, 0) | (240, 240), (0, 0, 1) | | `gbuffers_clouds` lightmap | (240, 240) | (0, 240) | (240, 240) | | `gbuffers_clouds` normals | (0, -1, 0) ×43, (0, 0, -1) ×14 | (0, 1, 0) ×57 | (0, -1, 0) ×43, (0, 0, -1) ×12, (-1, 0, 0) ×2 | | terrain `blockEntityId` | -1 | 0 | -1 | (The clouds drift between the two games' frames, so a couple of samples land on another side.) ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [x] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference Not vanilla: the `shaders/` pack format's vertex inputs and `blockEntityId`. The reference is Iris 1.11.7 on Minecraft 26.3, run and observed with a probe pack (no source read). Without a pack nothing changes (the cloud normals' `w` is 0). ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on 6cd182588f2d, against origin/main at d55e66d65, 4 min 48 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +49 −17 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ❌ 495 run, FAILED (errors=4) (2 min 21 s) | | rustfmt | ✅ (24 s) | | clippy | ✅ (1 min 8 s) | | tests: horizon-client-render | ✅ 707 passed (52 s) | | doc tests | ✅ 0 passed (1 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Run on a rented Linux box with GPU tests on lavapipe. The 4 Python errors are that box's git 2.34 (`git merge-tree --write-tree`, in `test_nightly_set` and `test_supervise`); they pass with git 2.55. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:14:59 +07:00
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#6154
No description provided.