[GH-ISSUE #2087] Pot renders incorrectly on the top #608

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

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

What I did: Placed an pot on the ground
What happened: Pot, even when dropped as an item, in the hand, or on the ground renders incorrectly.
What I expected: Normal pot rendering.
Horizon version: v0.2.68
OS, CPU, GPU: macOS, Apple M2 (CPU and GPU), 16GB Ram

Reported on Discord by Potato 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/2087 > What I did: Placed an pot on the ground > What happened: Pot, even when dropped as an item, in the hand, or on the ground renders incorrectly. > What I expected: Normal pot rendering. > Horizon version: v0.2.68 > OS, CPU, GPU: macOS, Apple M2 (CPU and GPU), 16GB Ram Reported on Discord by **Potato** in #horizon-bugs · [Discord thread](https://discord.com/channels/1559227979002028052/1564219906587885691) Tags: rendering **Attachments** (Discord links expire after a while; the thread keeps them) - [Untitled.mov](https://cdn.discordapp.com/attachments/1564219906587885691/1564219907585871944/Untitled.mov?ex=6ae078cf&is=6adf274f&hm=57b94512ce9b00c9516c14efcd091db541c68523994fe42293c5999d5d1ab014&) <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:28 +07:00
Author
Owner

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

Fixed in #2099 (waiting for review): the pot's top and bottom faces were drawn from both sides; vanilla culls one.

<!-- gh-comment-id:6414879507 --> @kacpherek commented on GitHub (Oct 26, 2026): Fixed in #2099 (waiting for review): the pot's top and bottom faces were drawn from both sides; vanilla culls one.
Author
Owner

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

Potato added on Discord:

oh,** maybe** it will be in v0.2.71, thanks

<!-- gh-comment-id:6418274409 --> @ludovic111 commented on GitHub (Oct 26, 2026): **Potato** added on Discord: > oh,** maybe** it will be in v0.2.71, thanks <!-- kira -->
Author
Owner

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

🤖 Agent: rdbtCVS’s AI agent (OpenAI Codex), triage follow-up. PR #2099 addresses decorated-pot face culling. It is still open, so recommend keeping this issue open until the relevant fix lands and the reported behavior is verified.

<!-- gh-comment-id:6418498029 --> @rdbtCVS commented on GitHub (Oct 26, 2026): 🤖 Agent: rdbtCVS’s AI agent (OpenAI Codex), triage follow-up. PR #2099 addresses decorated-pot face culling. It is still open, so recommend keeping this issue open until the relevant fix lands and the reported behavior is verified.
Author
Owner

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

Potato added on Discord:

hopefully, cause it still didnt f​ix other bugs either, so they SHOULD

<!-- gh-comment-id:6418515292 --> @ludovic111 commented on GitHub (Oct 26, 2026): **Potato** added on Discord: > hopefully, cause it still didnt f​ix other bugs either, so they SHOULD <!-- kira -->
Author
Owner

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

🤖 Agent: verified on current main: the pot renders wrong, and #2583 fixes it. That pull request carries @kacpherek's #2099 (the cull itself) plus the regression tests that were missing.

What I verified, and how

  • The bug. The pot's model (DecoratedPotRenderer.createBaseLayer) has two flat boxes, top (14×0×14 at y=16) and bottom (14×0×14 at y=0). A flat box is drawn with all six faces, so each plane carries an up-facing and a down-facing quad at the same place. Vanilla submits all of them with RenderTypes.entitySolid, whose pipeline culls back faces (RenderPipelines.ENTITY_SOLID keeps the default cull, unlike the *_NO_CULL entity pipelines, which call withCull(false)), so only one side of each plane is ever rasterised. Horizon's entity pipelines draw two-sided (cull_mode: None in gfx.rs), so both sides are drawn and they z-fight: the pot renders wrong on the ground, dropped as an item and in the hand.
  • The fix (#2583, carrying #2099): all of vanilla's 28 submitted quads are kept and the back faces are culled the way entitySolid does — the pot's quads carry a flag in the vertex (the normal's w) and entity.wgsl discards the back-facing pixels.
  • The parity gate that @ludovic111's agent asked @kacpherek to re-run passes on that branch: python3 tools/parity.py block_entity_render item_model → PASS block_entity_render and PASS item_model. The pot still submits vanilla's 28 quads, with the same positions, UVs and colours.
  • The regression tests (new in #2583) fail without the cull. cargo test -p horizon-client --lib -- culls_its_back_faces:
    running 2 tests
    test item_render::special::tests::the_decorated_pot_item_culls_its_back_faces ... ok
    test block_entity_render::tests::the_decorated_pot_culls_its_back_faces ... ok
    
    test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 1214 filtered out; finished in 1.23s
    
    With the cull removed, both fail with entitySolid culls the pot's back faces; the block-entity test also fails if the pot drops any of vanilla's 28 quads.

Vanilla reference — DecoratedPotRenderer.createBaseLayer and .submit (every part with RenderTypes.entitySolid), RenderTypes.entitySolid → RenderPipelines.ENTITY_SOLID (the default back-face cull), CubeListBuilder.addBox (a zero-height box still has an up and a down face).

I cannot close this issue myself — the account has no permission to close issues on this repository — so I am leaving it open for a maintainer to close.

<!-- gh-comment-id:6430427179 --> @levzzz5154 commented on GitHub (Oct 27, 2026): 🤖 Agent: verified on current main: the pot renders wrong, and #2583 fixes it. That pull request carries @kacpherek's #2099 (the cull itself) plus the regression tests that were missing. **What I verified, and how** * **The bug.** The pot's model (`DecoratedPotRenderer.createBaseLayer`) has two flat boxes, `top` (14×0×14 at y=16) and `bottom` (14×0×14 at y=0). A flat box is drawn with all six faces, so each plane carries an up-facing and a down-facing quad at the same place. Vanilla submits all of them with `RenderTypes.entitySolid`, whose pipeline culls back faces (`RenderPipelines.ENTITY_SOLID` keeps the default cull, unlike the `*_NO_CULL` entity pipelines, which call `withCull(false)`), so only one side of each plane is ever rasterised. Horizon's entity pipelines draw two-sided (`cull_mode: None` in `gfx.rs`), so both sides are drawn and they z-fight: the pot renders wrong on the ground, dropped as an item and in the hand. * **The fix** (#2583, carrying #2099): all of vanilla's 28 submitted quads are kept and the back faces are culled the way `entitySolid` does — the pot's quads carry a flag in the vertex (the normal's w) and `entity.wgsl` discards the back-facing pixels. * **The parity gate** that @ludovic111's agent asked @kacpherek to re-run passes on that branch: `python3 tools/parity.py block_entity_render item_model` → `PASS block_entity_render` and `PASS item_model`. The pot still submits vanilla's 28 quads, with the same positions, UVs and colours. * **The regression tests** (new in #2583) fail without the cull. `cargo test -p horizon-client --lib -- culls_its_back_faces`: ``` running 2 tests test item_render::special::tests::the_decorated_pot_item_culls_its_back_faces ... ok test block_entity_render::tests::the_decorated_pot_culls_its_back_faces ... ok test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 1214 filtered out; finished in 1.23s ``` With the cull removed, both fail with `entitySolid culls the pot's back faces`; the block-entity test also fails if the pot drops any of vanilla's 28 quads. **Vanilla reference** — `DecoratedPotRenderer.createBaseLayer` and `.submit` (every part with `RenderTypes.entitySolid`), `RenderTypes.entitySolid` → `RenderPipelines.ENTITY_SOLID` (the default back-face cull), `CubeListBuilder.addBox` (a zero-height box still has an up and a down face). I cannot close this issue myself — the account has no permission to close issues on this repository — so I am leaving it open for a maintainer to close.
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#608
No description provided.