[PR #5693] [MERGED] Shader packs: cloudHeight and isElytraFlying uniforms (part of #3172) #6441

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

📋 Pull Request Information

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

Base: main ← Head: fix-3172-pack-uniforms


📝 Commits (3)

  • 6ad0a9d Shader packs: provide the cloudHeight and isElytraFlying uniforms
  • aaf25ac Merge main into #5693: the pack inputs keep main's mod params beside the two new uniforms
  • 67ebb02 Merge main into #5693: the two uniforms after main's isRightHanded … hasCeiling

📊 Changes

5 files changed (+66 additions, -4 deletions)

View changed files

📝 crates/horizon-client-render/src/clouds.rs (+10 -2)
📝 crates/horizon-client-render/src/environment.rs (+6 -0)
📝 crates/horizon-client-render/src/gfx/pack_uniforms.rs (+38 -0)
📝 crates/horizon-client/src/game.rs (+1 -1)
📝 crates/horizon-client/src/game/shader_packs.rs (+11 -1)

📄 Description

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

Two more names that Java-format packs read as zero (the "zero for now" log in gfx/pack_post.rs):

  • isElytraFlying: the player's fall-flying state, written as int 0/1 like hideGUI/firstPersonCamera.
  • cloudHeight (float): vanilla's CLOUD_HEIGHT environment attribute (default 192.33, visual/cloud_height of the dimension type), taken only when the dimension's cloud colour alpha is above 0, the same gate as LevelExtractor (26.3, lines ~216-219). Otherwise NaN, which is how @k3yh's comment on the issue says a pack reads "no clouds"; NaN is not a vanilla value. In vanilla data the overworld and overworld_caves give 192.33, the nether and the end give NaN. The clouds option is ignored, as in LevelExtractor. The 192.33 literal in clouds.rs is now a shared const.

Sources: vanilla 26.3 and the issue only. New names are appended at the end of NAMES.

Part of #3172 (not a fix for all of it). Still open there: velocity, playerMood, lightningBoltPosition, currentRenderedItemId, entityId, blockEntityId, entityColor, heavyFog, endFlashIntensity.

Open PR #5411 adds mod_params next to held_light in PackInputs and in shader_packs.rs; whichever lands second needs a trivial rebase.

Not hand-tested with a Java pack that declares the two names; covered by unit tests (cloud_height_needs_a_cloud_color, elytra_and_cloud_height_uniforms_are_written, NaN round trip).

pr_ready

On this machine fmt, clippy -D warnings, the Python tests and the public-tree check pass, and so do the 6 pack_uniforms tests. The full run has one failure that is not from this change: gfx::frame_gen::interpolation::tests::moves_the_view_halfway_with_the_camera fails identically on a clean upstream/main here (it needs a real wgpu adapter; with no adapter, as on GitHub CI, it returns early and passes). I did not touch frame_gen. No parity harness covers shader packs.

A separate Sonnet 5.5 reviewer read the diff and found no defects.

🤖 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/5693 **Author:** [@Joansitoh](https://github.com/Joansitoh) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix-3172-pack-uniforms` --- ### 📝 Commits (3) - [`6ad0a9d`](https://github.com/horizon-rust/horizon/commit/6ad0a9df83703edee4af8c86a3d18291b0781d3e) Shader packs: provide the cloudHeight and isElytraFlying uniforms - [`aaf25ac`](https://github.com/horizon-rust/horizon/commit/aaf25ac9a99edaf60a5af8757b3510db719946e0) Merge main into #5693: the pack inputs keep main's mod params beside the two new uniforms - [`67ebb02`](https://github.com/horizon-rust/horizon/commit/67ebb0257e1698856b9e624b692138d436dcc04b) Merge main into #5693: the two uniforms after main's isRightHanded … hasCeiling ### 📊 Changes **5 files changed** (+66 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/clouds.rs` (+10 -2) 📝 `crates/horizon-client-render/src/environment.rs` (+6 -0) 📝 `crates/horizon-client-render/src/gfx/pack_uniforms.rs` (+38 -0) 📝 `crates/horizon-client/src/game.rs` (+1 -1) 📝 `crates/horizon-client/src/game/shader_packs.rs` (+11 -1) </details> ### 📄 Description > 🤖 Opened by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally. Two more names that Java-format packs read as zero (the "zero for now" log in `gfx/pack_post.rs`): - `isElytraFlying`: the player's fall-flying state, written as int 0/1 like `hideGUI`/`firstPersonCamera`. - `cloudHeight` (float): vanilla's `CLOUD_HEIGHT` environment attribute (default 192.33, `visual/cloud_height` of the dimension type), taken only when the dimension's cloud colour alpha is above 0, the same gate as `LevelExtractor` (26.3, lines ~216-219). Otherwise NaN, which is how @k3yh's comment on the issue says a pack reads "no clouds"; NaN is not a vanilla value. In vanilla data the overworld and `overworld_caves` give 192.33, the nether and the end give NaN. The clouds *option* is ignored, as in `LevelExtractor`. The 192.33 literal in `clouds.rs` is now a shared const. Sources: vanilla 26.3 and the issue only. New names are appended at the end of `NAMES`. Part of #3172 (not a fix for all of it). Still open there: `velocity`, `playerMood`, `lightningBoltPosition`, `currentRenderedItemId`, `entityId`, `blockEntityId`, `entityColor`, `heavyFog`, `endFlashIntensity`. Open PR #5411 adds `mod_params` next to `held_light` in `PackInputs` and in `shader_packs.rs`; whichever lands second needs a trivial rebase. Not hand-tested with a Java pack that declares the two names; covered by unit tests (`cloud_height_needs_a_cloud_color`, `elytra_and_cloud_height_uniforms_are_written`, NaN round trip). ## pr_ready On this machine fmt, `clippy -D warnings`, the Python tests and the public-tree check pass, and so do the 6 `pack_uniforms` tests. The full run has one failure that is not from this change: `gfx::frame_gen::interpolation::tests::moves_the_view_halfway_with_the_camera` fails identically on a clean `upstream/main` here (it needs a real wgpu adapter; with no adapter, as on GitHub CI, it returns early and passes). I did not touch `frame_gen`. No parity harness covers shader packs. A separate Sonnet 5.5 reviewer read the diff and found no defects. 🤖 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:20:39 +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#6441
No description provided.