[GH-ISSUE #2487] Water is invisible through stained glass item #640

Closed
opened 2026-11-02 15:40:45 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @ludovic111 on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/2487

What I did: throw stained glass on the ground and look through it
What happened: the water behind it was invisible
What I expected: the colors would mix as you would expect from transparent materials
Horizon version: 0.2.73
OS, CPU, GPU: windows x86, ryzen 9 3950x, rtx 4060ti 8gb

Reported on Discord by kevennever#5592 in #horizon-bugs · Discord thread
Tags: rendering

Attachments (Discord links expire after a while; the thread keeps them)

Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.

Originally created by @ludovic111 on GitHub (Oct 26, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/2487 > What I did: throw stained glass on the ground and look through it > What happened: the water behind it was invisible > What I expected: the colors would mix as you would expect from transparent materials > Horizon version: 0.2.73 > OS, CPU, GPU: windows x86, ryzen 9 3950x, rtx 4060ti 8gb Reported on Discord by **kevennever#5592** in #horizon-bugs · [Discord thread](https://discord.com/channels/1559227979002028052/1564371523962282155) Tags: rendering **Attachments** (Discord links expire after a while; the thread keeps them) - [2026-10-26_20.11.39.png](https://cdn.discordapp.com/attachments/1564371523962282155/1564371524243292311/2026-10-26_20.11.39.png?ex=6ae10603&is=6adfb483&hm=a890091953085d262455fa88219635913e8094490389b393ed972c61e1579e51&) <sub>Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.</sub><!-- kira -->
bsakaguchi 2026-11-02 15:40:45 +07:00
Author
Owner

@kacpherek commented on GitHub (Oct 26, 2026):

Thanks kevennever#5592 for the report! A fix is up in #2492: translucent item quads (like stained glass) no longer write depth, so the water behind them shows through. It's waiting for review.

<!-- gh-comment-id:6426643404 --> @kacpherek commented on GitHub (Oct 26, 2026): Thanks kevennever#5592 for the report! A fix is up in #2492: translucent item quads (like stained glass) no longer write depth, so the water behind them shows through. It's waiting for review.
Author
Owner

@levzzz5154 commented on GitHub (Oct 27, 2026):

🤖 Agent: this one is covered by #2492 ("Show water through dropped stained glass items", kacpherek), which is open, so I am not opening a competing pull request. Here is what the vanilla rule is and where Horizon's rendering breaks it.

Vanilla. An item that is a block is drawn with the block's own model, and a translucent block's model is drawn in the translucent pass, which does not write depth: RenderPipelines.ITEM_TRANSLUCENT in vanilla's item rendering blends the quad and leaves the depth buffer alone, so the water behind a dropped stained glass item still shows through. Vanilla sorts those quads in its order independent transparency pass instead of relying on the depth buffer.

Horizon. The dropped item's quad went through the entity pipeline with depth writes on, so the quad wrote depth and the water behind it (drawn in the translucent terrain pass afterwards) failed the depth test and vanished: the item showed the glass and nothing behind it.

#2492 adds a separate RenderPipelines.ITEM_TRANSLUCENT pipeline for the translucent item quads (blended, depth tested, no depth write) and draws them before the translucent terrain, which is what makes the water behind the glass visible again.

Vanilla classes and methods: net.minecraft.client.renderer.RenderPipelines#ITEM_TRANSLUCENT, net.minecraft.client.renderer.entity.ItemRenderer#renderQuadList / renderTranslucentItem, net.minecraft.client.renderer.texture.TextureAtlas (the block model's own texture), and the block model's own BlockModel/ItemDisplayContext for a stained glass item.

I cannot close this issue (no permission on the upstream repository), so I leave it open for a maintainer.

<!-- gh-comment-id:6434544374 --> @levzzz5154 commented on GitHub (Oct 27, 2026): 🤖 Agent: this one is covered by #2492 ("Show water through dropped stained glass items", kacpherek), which is open, so I am not opening a competing pull request. Here is what the vanilla rule is and where Horizon's rendering breaks it. **Vanilla.** An item that is a block is drawn with the block's own model, and a translucent block's model is drawn in the translucent pass, which does not write depth: `RenderPipelines.ITEM_TRANSLUCENT` in vanilla's item rendering blends the quad and leaves the depth buffer alone, so the water behind a dropped stained glass item still shows through. Vanilla sorts those quads in its order independent transparency pass instead of relying on the depth buffer. **Horizon.** The dropped item's quad went through the entity pipeline with depth writes on, so the quad wrote depth and the water behind it (drawn in the translucent terrain pass afterwards) failed the depth test and vanished: the item showed the glass and nothing behind it. #2492 adds a separate `RenderPipelines.ITEM_TRANSLUCENT` pipeline for the translucent item quads (blended, depth tested, no depth write) and draws them before the translucent terrain, which is what makes the water behind the glass visible again. Vanilla classes and methods: `net.minecraft.client.renderer.RenderPipelines#ITEM_TRANSLUCENT`, `net.minecraft.client.renderer.entity.ItemRenderer#renderQuadList` / `renderTranslucentItem`, `net.minecraft.client.renderer.texture.TextureAtlas` (the block model's own texture), and the block model's own `BlockModel`/`ItemDisplayContext` for a stained glass item. I cannot close this issue (no permission on the upstream repository), so I leave it open for a maintainer.
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#640
No description provided.