[PR #2099] [MERGED] Decorated pot: draw one face of its top and bottom planes #4002

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

📋 Pull Request Information

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

Base: main ← Head: fix/2087-pot-top


📝 Commits (8)

  • 408a75a Decorated pot: draw one face of its top and bottom planes
  • d338bcd Decorated pot: say why only the outer faces stay
  • 83a6f5c Revert "Decorated pot: say why only the outer faces stay"
  • 9841ce7 Revert "Decorated pot: draw one face of its top and bottom planes"
  • c987778 Decorated pot: keep every quad and cull back faces like entitySolid
  • ef54b48 Merge origin/main into fix/2087-pot-top
  • 9b98998 Merge origin/main into fix/2087-pot-top (picks up main's rabbit-arm fix, #2716)
  • 9305cc3 Merge origin/main into fix/2087-pot-top

📊 Changes

6 files changed (+43 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/block_entity_render.rs (+11 -1)
📝 crates/horizon-client/src/entity.wgsl (+7 -2)
📝 crates/horizon-client/src/item_render.rs (+5 -2)
📝 crates/horizon-client/src/item_render/gui.rs (+1 -0)
📝 crates/horizon-client/src/item_render/special.rs (+14 -0)
📝 crates/horizon-client/src/mesher.rs (+5 -1)

📄 Description

What and why

The decorated pot looks wrong from above, as a block, as a dropped item and in the hand. The pot's top and bottom parts are flat 14x14 planes, and each plane has an up face and a down face in the same spot with different texture areas. Vanilla draws the whole pot with RenderTypes.entitySolid, which culls back faces, so you only see one face of each plane. Horizon's entity pipelines do not cull, so both faces are drawn on top of each other and fight for the same pixels.

Fix: keep every quad (28 per pot, as vanilla submits) and cull back faces when drawing the pot. The entity pipelines are shared with models that must not cull (mobs), so the culling is per quad: a quad of an entitySolid model carries Vertex::normal = CULL_BACK (w = 1, colour stays baked as before) and entity.wgsl discards its fragments when front_facing is false. That is the same rule the GPU applies for a culling pipeline (counter-clockwise front), and it covers the placed block, dropped items and the first-person hand, which draw through different passes. The GUI item path already culls back faces on the CPU.

Winding was checked against ModelPart.Cube: the up polygon (t2, t3, l3, l2) winds counter-clockwise seen from above and the down polygon (l1, l0, t0, t1) from below, so from outside only top's up face and bottom's down face survive. The side planes are single NORTH faces and are culled from behind, as in vanilla.

Only the decorated pot uses the flag for now. Other entitySolid models (conduit shell, trident, shield) can set the same flag later.

Fixes #2087.

Vanilla reference

  • DecoratedPotRenderer.createBaseLayer (the top and bottom planes) and submit (entitySolid for every part)
  • ModelPart.Cube (polygon vertex order and winding)
  • RenderPipelines.ENTITY_SOLID (back faces culled)

Self-check

cargo clippy -p horizon-client --all-targets -- -D warnings passes and entity.wgsl still validates with naga. I did not run block_entity_render parity or the game: parity needs a full client build plus the vanilla jars and I did not run it here. No quads are dropped any more, so the 28-quad count should match again.


🔄 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/2099 **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/2087-pot-top` --- ### 📝 Commits (8) - [`408a75a`](https://github.com/horizon-rust/horizon/commit/408a75aeb32f1f1e34d03f4ff9a42098fcf8514b) Decorated pot: draw one face of its top and bottom planes - [`d338bcd`](https://github.com/horizon-rust/horizon/commit/d338bcd070a6c2bf2568c1f57900bf222299929b) Decorated pot: say why only the outer faces stay - [`83a6f5c`](https://github.com/horizon-rust/horizon/commit/83a6f5c7b9b76071bc7798b63f11085d37beb61a) Revert "Decorated pot: say why only the outer faces stay" - [`9841ce7`](https://github.com/horizon-rust/horizon/commit/9841ce7824d8a65fbc66f5a2d2ecef07defd4912) Revert "Decorated pot: draw one face of its top and bottom planes" - [`c987778`](https://github.com/horizon-rust/horizon/commit/c987778e97f2290abce276333ffc22ba24f6ef78) Decorated pot: keep every quad and cull back faces like entitySolid - [`ef54b48`](https://github.com/horizon-rust/horizon/commit/ef54b481a759d9cb7a76ca7b0ba77dd89bbe44a4) Merge origin/main into fix/2087-pot-top - [`9b98998`](https://github.com/horizon-rust/horizon/commit/9b98998991dc09d9f5751893da81caf67d7bcbdf) Merge origin/main into fix/2087-pot-top (picks up main's rabbit-arm fix, #2716) - [`9305cc3`](https://github.com/horizon-rust/horizon/commit/9305cc343973181ad48e4b8a602982882271f33a) Merge origin/main into fix/2087-pot-top ### 📊 Changes **6 files changed** (+43 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/block_entity_render.rs` (+11 -1) 📝 `crates/horizon-client/src/entity.wgsl` (+7 -2) 📝 `crates/horizon-client/src/item_render.rs` (+5 -2) 📝 `crates/horizon-client/src/item_render/gui.rs` (+1 -0) 📝 `crates/horizon-client/src/item_render/special.rs` (+14 -0) 📝 `crates/horizon-client/src/mesher.rs` (+5 -1) </details> ### 📄 Description ## What and why The decorated pot looks wrong from above, as a block, as a dropped item and in the hand. The pot's `top` and `bottom` parts are flat 14x14 planes, and each plane has an up face and a down face in the same spot with different texture areas. Vanilla draws the whole pot with `RenderTypes.entitySolid`, which culls back faces, so you only see one face of each plane. Horizon's entity pipelines do not cull, so both faces are drawn on top of each other and fight for the same pixels. Fix: keep every quad (28 per pot, as vanilla submits) and cull back faces when drawing the pot. The entity pipelines are shared with models that must not cull (mobs), so the culling is per quad: a quad of an `entitySolid` model carries `Vertex::normal = CULL_BACK` (w = 1, colour stays baked as before) and `entity.wgsl` discards its fragments when `front_facing` is false. That is the same rule the GPU applies for a culling pipeline (counter-clockwise front), and it covers the placed block, dropped items and the first-person hand, which draw through different passes. The GUI item path already culls back faces on the CPU. Winding was checked against `ModelPart.Cube`: the up polygon (t2, t3, l3, l2) winds counter-clockwise seen from above and the down polygon (l1, l0, t0, t1) from below, so from outside only `top`'s up face and `bottom`'s down face survive. The side planes are single `NORTH` faces and are culled from behind, as in vanilla. Only the decorated pot uses the flag for now. Other `entitySolid` models (conduit shell, trident, shield) can set the same flag later. Fixes #2087. ## Vanilla reference - `DecoratedPotRenderer.createBaseLayer` (the `top` and `bottom` planes) and `submit` (`entitySolid` for every part) - `ModelPart.Cube` (polygon vertex order and winding) - `RenderPipelines.ENTITY_SOLID` (back faces culled) ## Self-check `cargo clippy -p horizon-client --all-targets -- -D warnings` passes and `entity.wgsl` still validates with naga. I did not run `block_entity_render` parity or the game: parity needs a full client build plus the vanilla jars and I did not run it here. No quads are dropped any more, so the 28-quad count should match again. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:13:56 +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#4002
No description provided.