[PR #5966] [MERGED] Shader packs: isRightHanded, is_on_ground and the dimension's uniforms #6585

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5966
Author: @TobiasLogic
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: shaderpacks/dimension-uniforms


📝 Commits (1)

  • b80d1a0 Shader packs: isRightHanded, is_on_ground and the dimension's uniforms

📊 Changes

2 files changed (+31 additions, -0 deletions)

View changed files

📝 crates/horizon-client-render/src/gfx/pack_uniforms.rs (+24 -0)
📝 crates/horizon-client/src/game/shader_packs.rs (+7 -0)

📄 Description

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

What and why

Fixes #5965.

Seven Iris uniforms that were "zero for now" get their values (pack_uniforms.rs, from PackInputs filled in shader_packs.rs):

Uniform Value
isRightHanded 1 unless the Main Hand option is left
is_on_ground the player's on-ground flag
bedrockLevel, heightLimit, logicalHeightLimit, hasSkylight the level's shape (world.shape: min_y, height, logical_height, sky_light)
hasCeiling 1 in the Nether, as natural_spawning already has it

Why it matters: BSL and BSL Classic (Bloop shares the code) fade the sky, fog, clouds, stars and light shafts by clamp((cameraPosition.y - bedrockLevel + 6.0) / 8.0, 0.0, 1.0). With bedrockLevel 0 they vanish below y -6 instead of below the bedrock. BSL's gbuffers_hand picks the main hand from isRightHanded. Of the 28 packs I test with, BSL, BSL Classic and Bloop read isRightHanded, bedrockLevel and heightLimit, and Bliss reads is_on_ground. None of them reads logicalHeightLimit, hasSkylight or hasCeiling, which are here because they come from the same dimension type.

cloudHeight is left to #5693 (Joansitoh, part of #3172), which takes it from vanilla's environment attribute.

Not hand-tested in game; the values were compared with Iris before (below).

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

The dimension types' min_y, height, logical_height, has_skylight and has_ceiling (Horizon's LevelShape). The uniform names and values are Iris's: Iris 1.11.7 on 26.3 in the overworld (right-handed, standing on the ground) gave isRightHanded 1, is_on_ground 1, bedrockLevel -64, heightLimit 384, logicalHeightLimit 384, hasSkylight 1, hasCeiling 0, read back by a probe pack (run and observed, no source read).

Self-check

pr_ready (tools/pr_ready.py --quick on 2a929d23955a, against origin/main at b01a37b40, 6 min 51 s)

Check Result
Scope ✅ 2 files, +31 −0
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 515 passed (1 min 6 s)
rustfmt ✅ (15 s)
clippy ✅ (2 min 49 s)
tests: horizon-client, horizon-client-render ✅ 2537 passed (2 min 35 s)
doc tests ✅ 0 passed (4 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 (Ubuntu 24.04, stable Rust 1.99.1), GPU tests on lavapipe.

🤖 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/5966 **Author:** [@TobiasLogic](https://github.com/TobiasLogic) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `shaderpacks/dimension-uniforms` --- ### 📝 Commits (1) - [`b80d1a0`](https://github.com/horizon-rust/horizon/commit/b80d1a085139bdfd0b4708ef7aff8cd540c3df5a) Shader packs: isRightHanded, is_on_ground and the dimension's uniforms ### 📊 Changes **2 files changed** (+31 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/gfx/pack_uniforms.rs` (+24 -0) 📝 `crates/horizon-client/src/game/shader_packs.rs` (+7 -0) </details> ### 📄 Description > 🤖 Opened by TobiasLogic's AI agent (Claude Code, Claude Opus 5.5), not by TobiasLogic personally. ## What and why Fixes #5965. Seven Iris uniforms that were "zero for now" get their values (`pack_uniforms.rs`, from `PackInputs` filled in `shader_packs.rs`): | Uniform | Value | | --- | --- | | `isRightHanded` | 1 unless the Main Hand option is left | | `is_on_ground` | the player's on-ground flag | | `bedrockLevel`, `heightLimit`, `logicalHeightLimit`, `hasSkylight` | the level's shape (`world.shape`: `min_y`, `height`, `logical_height`, `sky_light`) | | `hasCeiling` | 1 in the Nether, as `natural_spawning` already has it | Why it matters: BSL and BSL Classic (Bloop shares the code) fade the sky, fog, clouds, stars and light shafts by `clamp((cameraPosition.y - bedrockLevel + 6.0) / 8.0, 0.0, 1.0)`. With `bedrockLevel` 0 they vanish below y -6 instead of below the bedrock. BSL's `gbuffers_hand` picks the main hand from `isRightHanded`. Of the 28 packs I test with, BSL, BSL Classic and Bloop read `isRightHanded`, `bedrockLevel` and `heightLimit`, and Bliss reads `is_on_ground`. None of them reads `logicalHeightLimit`, `hasSkylight` or `hasCeiling`, which are here because they come from the same dimension type. `cloudHeight` is left to #5693 (Joansitoh, part of #3172), which takes it from vanilla's environment attribute. Not hand-tested in game; the values were compared with Iris before (below). ## 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 The dimension types' `min_y`, `height`, `logical_height`, `has_skylight` and `has_ceiling` (Horizon's `LevelShape`). The uniform names and values are Iris's: Iris 1.11.7 on 26.3 in the overworld (right-handed, standing on the ground) gave `isRightHanded` 1, `is_on_ground` 1, `bedrockLevel` -64, `heightLimit` 384, `logicalHeightLimit` 384, `hasSkylight` 1, `hasCeiling` 0, read back by a probe pack (run and observed, no source read). ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on 2a929d23955a, against origin/main at b01a37b40, 6 min 51 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +31 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 515 passed (1 min 6 s) | | rustfmt | ✅ (15 s) | | clippy | ✅ (2 min 49 s) | | tests: horizon-client, horizon-client-render | ✅ 2537 passed (2 min 35 s) | | doc tests | ✅ 0 passed (4 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 (Ubuntu 24.04, stable Rust 1.99.1), GPU tests on lavapipe. 🤖 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:23:26 +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#6585
No description provided.