[PR #1784] [MERGED] Shader packs, clean room 32: translucent entity parts and particles #3756

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/1784
Author: @ludovic111
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: feat/shader-packs-translucent-entities


📝 Commits (9)

  • 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
  • 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
  • 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
  • eab457d Merge feat/shader-packs-entities into feat/shader-packs-translucent-entities

📊 Changes

14 files changed (+885 additions, -23 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 (+24 -6)
📝 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 (+427 -0)
📝 crates/horizon-client/src/gfx/pack_post.rs (+162 -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 (+143 -4)
📝 crates/horizon-shaders/src/translate/mod.rs (+96 -1)
📝 crates/horizon-shaders/tests/real_packs.rs (+5 -2)

📄 Description

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

Shader packs, clean room 32: a pack draws translucent entity parts and particles. Stacked on #1771.

What

  • Which programs (spec 2.3, with their fallbacks):
    • gbuffers_entities_translucent (→ the gbuffers_entities chain) draws name tags' see-through background and entity shadows;
    • gbuffers_particles (→ textured_lit → textured → basic) draws particles.
  • Name tag text is gbuffers_entities (spec 2.3: "entities, name tag text"), so the visible text of a normal tag is marked as an entity part; a sneaking player's (discrete) tag stays translucent.
  • Blending: both blend with the translucent default (OQ-23). Particles keep vanilla's alpha cut at 0.1; translucent parts lose only fully transparent texels, so a shadow fades out. blend.* and alphaTest.* override.
  • Ordering keys (3.2):
    • separateEntityDraws = true moves translucent entity parts after deferred;
    • particles draw after deferred unless particles.ordering = before or particles.before.deferred = true (ours are all translucent, so mixed is after).
  • Without a shader pack nothing changes: spans are only recorded while a pack is loaded (#1769), and Horizon's entity draw is still one call.

Clean room

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

How tested

  • Unit tests: the new chains, blends and ordering keys in water_falls_back_to_terrain_and_blends.
  • In game (screenshots local; the packs' licences forbid uploading them):
    • Complementary: a campfire's smoke is drawn by the pack's particles program; name tags and shadows look right.
    • BSL: name tags draw; their text is washed out like BSL's other side faces (the dark side faces noted in #1771, rechecked in slice 8).
  • Parity: the 30 harnesses game.rs, game/names.rs and game/shader_packs.rs select pass on this group's top (#1786).
  • lan_e2e: see the group note in #1786.
  • Without a pack: see #1786 (A/B and screenshots for the whole group).

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/1784 **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-translucent-entities` --- ### 📝 Commits (9) - [`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 - [`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 - [`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 - [`eab457d`](https://github.com/horizon-rust/horizon/commit/eab457d0aec2cdf2d0f5983da3b3341c2ecf4de5) Merge feat/shader-packs-entities into feat/shader-packs-translucent-entities ### 📊 Changes **14 files changed** (+885 additions, -23 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` (+24 -6) 📝 `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` (+427 -0) 📝 `crates/horizon-client/src/gfx/pack_post.rs` (+162 -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` (+143 -4) 📝 `crates/horizon-shaders/src/translate/mod.rs` (+96 -1) 📝 `crates/horizon-shaders/tests/real_packs.rs` (+5 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. **Shader packs, clean room 32:** a pack draws translucent entity parts and particles. Stacked on #1771. ## What - **Which programs** (spec 2.3, with their fallbacks): - `gbuffers_entities_translucent` (→ the `gbuffers_entities` chain) draws name tags' see-through background and entity shadows; - `gbuffers_particles` (→ `textured_lit` → `textured` → `basic`) draws particles. - **Name tag text** is `gbuffers_entities` (spec 2.3: "entities, name tag text"), so the visible text of a normal tag is marked as an entity part; a sneaking player's (discrete) tag stays translucent. - **Blending:** both blend with the translucent default (OQ-23). Particles keep vanilla's alpha cut at 0.1; translucent parts lose only fully transparent texels, so a shadow fades out. `blend.*` and `alphaTest.*` override. - **Ordering keys (3.2):** - `separateEntityDraws = true` moves translucent entity parts after deferred; - particles draw after deferred unless `particles.ordering = before` or `particles.before.deferred = true` (ours are all translucent, so `mixed` is after). - **Without a shader pack** nothing changes: spans are only recorded while a pack is loaded (#1769), and Horizon's entity draw is still one call. ## Clean room Clean-room: implemented from `cleanroom/shader-packs-spec.md` revision 1, §2.1, §2.3, §3.2, OQ-23; no other loader's code read. ## How tested - **Unit tests:** the new chains, blends and ordering keys in `water_falls_back_to_terrain_and_blends`. - **In game** (screenshots local; the packs' licences forbid uploading them): - **Complementary:** a campfire's smoke is drawn by the pack's particles program; name tags and shadows look right. - **BSL:** name tags draw; their text is washed out like BSL's other side faces (the dark side faces noted in #1771, rechecked in slice 8). - **Parity:** the 30 harnesses `game.rs`, `game/names.rs` and `game/shader_packs.rs` select pass on this group's top (#1786). - **lan_e2e:** see the group note in #1786. - **Without a pack:** see #1786 (A/B and screenshots for the whole group). ## 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#3756
No description provided.