[PR #7143] [MERGED] Fix invisible elytra wings in the inventory preview (fixes #7000) #7371

Closed
opened 2026-11-03 06:38:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7143
Author: @DUzzL
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/7000-elytra-inventory


📝 Commits (1)

  • 5c314bd Draw the elytra's wings from both sides in the inventory preview (fixes #7000)

📊 Changes

1 file changed (+59 additions, -8 deletions)

View changed files

📝 crates/horizon-client/src/game/perspective.rs (+59 -8)

📄 Description

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

Fixes #7000

What / why

In the inventory player preview an equipped elytra showed only two small tips at the shoulders. The preview culls back faces (player_preview_quads, n.z >= 0), but the wings must be drawn from both sides: the elytra texture is empty on the face that looks at the body, and the opaque face is the one seen through it from the front. Culling removed the opaque face, so the wings looked invisible.

Fix: the wing vertices are marked no-cull in the preview (player_preview_quads_no_cull), keeping their faces (flipped winding, light from the face's own normal). Other preview geometry is still culled. Unit test: no_cull_faces_stay_in_the_preview_when_they_look_away.

Vanilla reference

  • WingsLayer.submit renders through EquipmentLayerRenderer.renderLayers, which uses RenderTypes.armorCutoutNoCull (or armorCutoutNoCullGlint).
  • ElytraModel.createLayer / setupAnim match the existing pose code (checked).
  • The preview is InventoryScreen.extractEntityInInventoryFollowsMouse.

Verification

  • Before: fresh temp home, creative world, elytra via /item replace, horizon-ctl open-inventory + screenshot: only shoulder tips visible, one side missing when the cursor turns the body.
  • After: both wings visible beside and behind the body, also with the body turned by the cursor.
  • Debug print showed 48 wing vertices and resting angles, so geometry was fine; only culling dropped it.

pr_ready

pr_ready (tools/pr_ready.py --quick --base upstream/main on DESKTOP-6RJOI59, against upstream/main at b8b268e51, 12 min 13 s)

Check Result
Scope ✅ 1 files, +59 −8
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 611 passed
rustfmt ✅
clippy ✅
tests: horizon-client ✅ 654 passed
doc tests ✅
mod API up to date ✅
Parity ➖ 91 affected, to run in CI (--quick)

🔄 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/7143 **Author:** [@DUzzL](https://github.com/DUzzL) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/7000-elytra-inventory` --- ### 📝 Commits (1) - [`5c314bd`](https://github.com/horizon-rust/horizon/commit/5c314bd4ab2498e097c257933989e44291ca0a01) Draw the elytra's wings from both sides in the inventory preview (fixes #7000) ### 📊 Changes **1 file changed** (+59 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/perspective.rs` (+59 -8) </details> ### 📄 Description > 🤖 Opened by DUzzL's AI agent (Claude Code), not by DUzzL himself. Fixes #7000 ## What / why In the inventory player preview an equipped elytra showed only two small tips at the shoulders. The preview culls back faces (`player_preview_quads`, `n.z >= 0`), but the wings must be drawn from both sides: the elytra texture is empty on the face that looks at the body, and the opaque face is the one seen through it from the front. Culling removed the opaque face, so the wings looked invisible. Fix: the wing vertices are marked no-cull in the preview (`player_preview_quads_no_cull`), keeping their faces (flipped winding, light from the face's own normal). Other preview geometry is still culled. Unit test: `no_cull_faces_stay_in_the_preview_when_they_look_away`. ## Vanilla reference - `WingsLayer.submit` renders through `EquipmentLayerRenderer.renderLayers`, which uses `RenderTypes.armorCutoutNoCull` (or `armorCutoutNoCullGlint`). - `ElytraModel.createLayer` / `setupAnim` match the existing pose code (checked). - The preview is `InventoryScreen.extractEntityInInventoryFollowsMouse`. ## Verification - Before: fresh temp home, creative world, elytra via `/item replace`, `horizon-ctl open-inventory` + screenshot: only shoulder tips visible, one side missing when the cursor turns the body. - After: both wings visible beside and behind the body, also with the body turned by the cursor. - Debug print showed 48 wing vertices and resting angles, so geometry was fine; only culling dropped it. ## pr_ready **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on DESKTOP-6RJOI59, against upstream/main at b8b268e51, 12 min 13 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +59 −8 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 611 passed | | rustfmt | ✅ | | clippy | ✅ | | tests: horizon-client | ✅ 654 passed | | doc tests | ✅ | | mod API up to date | ✅ | | Parity | ➖ 91 affected, to run in CI (--quick) | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:38:28 +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#7371
No description provided.