[PR #1785] [MERGED] Shader packs, clean room 33: clouds #3758

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1785
Author: @ludovic111
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: feat/shader-packs-clouds


📝 Commits (10+)

  • b5a7911 Shader packs, clean room 30: the loader's alpha test
  • ab289a2 Shader packs, clean room 31: entities and block entities
  • 3a7d00a Shader packs, clean room 32: translucent entity parts and particles
  • abe7047 Shader packs, clean room 33: clouds
  • 90fe138 Merge branch 'feat/shader-packs-entity-spans' into feat/shader-packs-alpha-test
  • c4856e6 Merge branch 'feat/shader-packs-alpha-test' into feat/shader-packs-entities
  • 257654e Merge branch 'feat/shader-packs-entities' into feat/shader-packs-translucent-entities
  • c395797 Merge branch 'feat/shader-packs-translucent-entities' into feat/shader-packs-clouds
  • b0fd6e6 Merge feat/shader-packs-entity-spans into feat/shader-packs-alpha-test
  • 02248f4 Merge feat/shader-packs-alpha-test into feat/shader-packs-entities

📊 Changes

15 files changed (+1075 additions, -24 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+3 -3)
📝 crates/horizon-client/src/game/names.rs (+4 -0)
📝 crates/horizon-client/src/game/shader_packs.rs (+13 -0)
📝 crates/horizon-client/src/gfx.rs (+42 -7)
📝 crates/horizon-client/src/gfx/pack_atlas.rs (+1 -0)
📝 crates/horizon-client/src/gfx/pack_draw.rs (+2 -0)
➕ crates/horizon-client/src/gfx/pack_entities.rs (+462 -0)
📝 crates/horizon-client/src/gfx/pack_post.rs (+241 -5)
📝 crates/horizon-client/src/gfx/pack_sky.rs (+2 -0)
📝 crates/horizon-client/src/gfx/pack_timing.rs (+2 -1)
📝 crates/horizon-shaders/src/lib.rs (+1 -1)
📝 crates/horizon-shaders/src/post.rs (+164 -4)
📝 crates/horizon-shaders/src/translate/mod.rs (+125 -1)
📝 crates/horizon-shaders/src/translate/rewrite.rs (+7 -0)
📝 crates/horizon-shaders/tests/real_packs.rs (+6 -2)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Shader packs, clean room 33: a pack draws the clouds. Stacked on #1784.

What

  • gbuffers_clouds draws Horizon's cloud mesh after entities, blended with the translucent default, with no alpha test (OQ-23). It has no fallback (spec 2.3, OQ-3): without it Horizon draws its clouds.
  • Vertices: the clouds' own mesh and uniform (offset and the four face shades, at set 1), full sky light, the face normal.
  • A pack that has the program hides Horizon's clouds, even when it writes nothing. BSL's program discards everything unless its own option asks for vanilla clouds, and Complementary's writes no buffer. Both packs draw their own clouds, so vanilla's must go.
  • Translator fix: a bare discard; or return; becomes if (true) discard;/if (true) return;. naga refuses code left after an unconditional exit ("Expression not visited"), which GLSL allows. This made BSL's clouds program translate, and also Complementary Unbound's gbuffers_skytextured: its sun and moon no longer fall back to gbuffers_textured.
  • Without a shader pack nothing changes: Horizon's cloud draw is skipped only when the pack has gbuffers_clouds.

Clean room

Clean-room: implemented from cleanroom/shader-packs-spec.md revision 1, §2.3, OQ-3, OQ-23; no other loader's code read.

How tested

  • Unit tests:
    • code_after_discard_or_return_translates;
    • water_falls_back_to_terrain_and_blends: no clouds program without gbuffers_clouds.
  • real_packs over the four test packs: no "Expression not visited" error left.
  • In game (screenshots local; the packs' licences forbid uploading them):
    • Complementary: before this PR, Horizon's blocky clouds showed over its sky; now they are gone.
    • BSL: only its own sky clouds show.
  • Group checks (parity, lan_e2e, A/B and screenshots without a pack): see #1786.

Needs Ludovic

Nothing. Label skip-release: players see no change.

🤖 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/1785 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/shader-packs-clouds` --- ### 📝 Commits (10+) - [`b5a7911`](https://github.com/horizon-rust/horizon/commit/b5a791170d1e1bec47f2508419d2918c72f891f1) Shader packs, clean room 30: the loader's alpha test - [`ab289a2`](https://github.com/horizon-rust/horizon/commit/ab289a2cf3f84fac470eb146e140c2fa7dc55f67) Shader packs, clean room 31: entities and block entities - [`3a7d00a`](https://github.com/horizon-rust/horizon/commit/3a7d00a74c3202242356b31ef94a53e8b4478fba) Shader packs, clean room 32: translucent entity parts and particles - [`abe7047`](https://github.com/horizon-rust/horizon/commit/abe7047d1947e12225a8baa120b8f4b86ace0a70) Shader packs, clean room 33: clouds - [`90fe138`](https://github.com/horizon-rust/horizon/commit/90fe138e836881088c771c8d8106e090b836c1ba) Merge branch 'feat/shader-packs-entity-spans' into feat/shader-packs-alpha-test - [`c4856e6`](https://github.com/horizon-rust/horizon/commit/c4856e6febb28aeb6faa06c4c2ea6e5cf8c73c8a) Merge branch 'feat/shader-packs-alpha-test' into feat/shader-packs-entities - [`257654e`](https://github.com/horizon-rust/horizon/commit/257654ef30b6ead67be08b5128428ff057a54229) Merge branch 'feat/shader-packs-entities' into feat/shader-packs-translucent-entities - [`c395797`](https://github.com/horizon-rust/horizon/commit/c39579772c2c89ce3fa01ba181ca521731393220) Merge branch 'feat/shader-packs-translucent-entities' into feat/shader-packs-clouds - [`b0fd6e6`](https://github.com/horizon-rust/horizon/commit/b0fd6e660e4017e8f936b31ac3432eb760886de4) Merge feat/shader-packs-entity-spans into feat/shader-packs-alpha-test - [`02248f4`](https://github.com/horizon-rust/horizon/commit/02248f431479686b820ca2250010a658b8b4a71d) Merge feat/shader-packs-alpha-test into feat/shader-packs-entities ### 📊 Changes **15 files changed** (+1075 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+3 -3) 📝 `crates/horizon-client/src/game/names.rs` (+4 -0) 📝 `crates/horizon-client/src/game/shader_packs.rs` (+13 -0) 📝 `crates/horizon-client/src/gfx.rs` (+42 -7) 📝 `crates/horizon-client/src/gfx/pack_atlas.rs` (+1 -0) 📝 `crates/horizon-client/src/gfx/pack_draw.rs` (+2 -0) ➕ `crates/horizon-client/src/gfx/pack_entities.rs` (+462 -0) 📝 `crates/horizon-client/src/gfx/pack_post.rs` (+241 -5) 📝 `crates/horizon-client/src/gfx/pack_sky.rs` (+2 -0) 📝 `crates/horizon-client/src/gfx/pack_timing.rs` (+2 -1) 📝 `crates/horizon-shaders/src/lib.rs` (+1 -1) 📝 `crates/horizon-shaders/src/post.rs` (+164 -4) 📝 `crates/horizon-shaders/src/translate/mod.rs` (+125 -1) 📝 `crates/horizon-shaders/src/translate/rewrite.rs` (+7 -0) 📝 `crates/horizon-shaders/tests/real_packs.rs` (+6 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. **Shader packs, clean room 33:** a pack draws the clouds. Stacked on #1784. ## What - **`gbuffers_clouds`** draws Horizon's cloud mesh after entities, blended with the translucent default, with no alpha test (OQ-23). It has no fallback (spec 2.3, OQ-3): without it Horizon draws its clouds. - **Vertices:** the clouds' own mesh and uniform (offset and the four face shades, at set 1), full sky light, the face normal. - **A pack that has the program hides Horizon's clouds, even when it writes nothing.** BSL's program discards everything unless its own option asks for vanilla clouds, and Complementary's writes no buffer. Both packs draw their own clouds, so vanilla's must go. - **Translator fix:** a bare `discard;` or `return;` becomes `if (true) discard;`/`if (true) return;`. naga refuses code left after an unconditional exit ("Expression not visited"), which GLSL allows. This made BSL's clouds program translate, and also Complementary Unbound's `gbuffers_skytextured`: its sun and moon no longer fall back to `gbuffers_textured`. - **Without a shader pack** nothing changes: Horizon's cloud draw is skipped only when the pack has `gbuffers_clouds`. ## Clean room Clean-room: implemented from `cleanroom/shader-packs-spec.md` revision 1, §2.3, OQ-3, OQ-23; no other loader's code read. ## How tested - **Unit tests:** - `code_after_discard_or_return_translates`; - `water_falls_back_to_terrain_and_blends`: no clouds program without `gbuffers_clouds`. - **`real_packs`** over the four test packs: no "Expression not visited" error left. - **In game** (screenshots local; the packs' licences forbid uploading them): - **Complementary:** before this PR, Horizon's blocky clouds showed over its sky; now they are gone. - **BSL:** only its own sky clouds show. - **Group checks** (parity, lan_e2e, A/B and screenshots without a pack): see #1786. ## Needs Ludovic Nothing. Label `skip-release`: players see no change. 🤖 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 04:12:06 +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#3758
No description provided.