[PR #2492] [MERGED] Show water through dropped stained glass items #4364

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

📋 Pull Request Information

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

Base: main ← Head: fix/2487-glass-item-water


📝 Commits (2)

  • d75ef5e Draw translucent item quads without depth writes so water shows through glass items
  • a529be8 Keep translucent item rendering with enchantment glint

📊 Changes

6 files changed (+92 additions, -10 deletions)

View changed files

📝 crates/horizon-client/src/entity.wgsl (+1 -1)
📝 crates/horizon-client/src/gfx.rs (+41 -5)
📝 crates/horizon-client/src/gfx/entity_batch.rs (+9 -2)
📝 crates/horizon-client/src/item_render.rs (+39 -2)
📝 crates/horizon-client/src/item_render/gui.rs (+1 -0)
📝 crates/horizon-client/src/item_render/special.rs (+1 -0)

📄 Description

What and why

Water seen through a dropped stained glass item was invisible. Dropped items were drawn in the opaque entity pass with depth writes, before translucent terrain. The glass quads wrote depth, so the water behind them failed the depth test and was never drawn.

Item quads whose sprite has translucent pixels (alpha neither 0 nor 255, or force_translucent) are now tagged and drawn in their own pass, still before translucent terrain but with depth testing only and no depth writes. The water behind the glass is drawn and blends with it, and glass items under water still show.

Fixes #2487.

Vanilla reference

  • BakedQuad.MaterialInfo.of (translucent item sheet from Transparency.hasTranslucent)
  • NativeImage.computeTransparency
  • RenderPipelines.ITEM_TRANSLUCENT

Self-check

cargo check -p horizon-client passes.


🔄 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/2492 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/2487-glass-item-water` --- ### 📝 Commits (2) - [`d75ef5e`](https://github.com/horizon-rust/horizon/commit/d75ef5e4f72426551c5aa9b68099037300e26e93) Draw translucent item quads without depth writes so water shows through glass items - [`a529be8`](https://github.com/horizon-rust/horizon/commit/a529be89156d129a359fdfc1004390ecc3f82045) Keep translucent item rendering with enchantment glint ### 📊 Changes **6 files changed** (+92 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entity.wgsl` (+1 -1) 📝 `crates/horizon-client/src/gfx.rs` (+41 -5) 📝 `crates/horizon-client/src/gfx/entity_batch.rs` (+9 -2) 📝 `crates/horizon-client/src/item_render.rs` (+39 -2) 📝 `crates/horizon-client/src/item_render/gui.rs` (+1 -0) 📝 `crates/horizon-client/src/item_render/special.rs` (+1 -0) </details> ### 📄 Description ## What and why Water seen through a dropped stained glass item was invisible. Dropped items were drawn in the opaque entity pass with depth writes, before translucent terrain. The glass quads wrote depth, so the water behind them failed the depth test and was never drawn. Item quads whose sprite has translucent pixels (alpha neither 0 nor 255, or `force_translucent`) are now tagged and drawn in their own pass, still before translucent terrain but with depth testing only and no depth writes. The water behind the glass is drawn and blends with it, and glass items under water still show. Fixes #2487. ## Vanilla reference - `BakedQuad.MaterialInfo.of` (translucent item sheet from `Transparency.hasTranslucent`) - `NativeImage.computeTransparency` - `RenderPipelines.ITEM_TRANSLUCENT` ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:16:37 +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#4364
No description provided.