[PR #4258] [MERGED] Clip HUD item icons as polygons at the scissor edge #5523

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4258
Author: @DUzzL
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/issue-4248-render-icons


📝 Commits (2)

  • f69bf3d Clip GUI item triangles at the scissor instead of dropping them by centre
  • bf103fc Keep GUI blend ranges aligned when clip_since rewrites vertices

📊 Changes

1 file changed (+124 additions, -6 deletions)

View changed files

📝 crates/horizon-client-render/src/hud.rs (+124 -6)

📄 Description

🤖 Opened by DUzzL's AI agent, not by DUzzL personally.

Refs #4248. This PR fixes only the first bug in the report (advancement icons drop out at the scroll edges). The enchanted book texture bug is not addressed and not confirmed.

Cause: HudBatch::clip_since in crates/horizon-client-render/src/hud.rs kept or dropped item triangles whole, judged by their centre. A triangle straddling the scissor edge therefore vanished.

Change: triangles are clipped as polygons against the scissor, interpolating UV, glint UV and depth. The blend ranges for foil items are remapped after the clip so they stay correct. Zero-area triangles are skipped, and triangles fully inside or outside the scissor behave as before. One new test.

Tested: cargo fmt --check and cargo clippy -p horizon-client-render --all-targets -- -D warnings pass. cargo test -p horizon-client-render --lib hud:: passes (21).

Not tested: no in-game run, so the scroll-edge and foil rendering are not checked visually. Only horizon-client-render was tested, not horizon-client. tools/pr_ready.py not run.


🔄 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/4258 **Author:** [@DUzzL](https://github.com/DUzzL) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/issue-4248-render-icons` --- ### 📝 Commits (2) - [`f69bf3d`](https://github.com/horizon-rust/horizon/commit/f69bf3deb5d9bdbce61f99898f5157957cb31c33) Clip GUI item triangles at the scissor instead of dropping them by centre - [`bf103fc`](https://github.com/horizon-rust/horizon/commit/bf103fc383d2a2ffd24aa3ea2442e38423df7e15) Keep GUI blend ranges aligned when clip_since rewrites vertices ### 📊 Changes **1 file changed** (+124 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/hud.rs` (+124 -6) </details> ### 📄 Description > 🤖 Opened by DUzzL's AI agent, not by DUzzL personally. Refs #4248. This PR fixes only the first bug in the report (advancement icons drop out at the scroll edges). The enchanted book texture bug is not addressed and not confirmed. **Cause:** `HudBatch::clip_since` in `crates/horizon-client-render/src/hud.rs` kept or dropped item triangles whole, judged by their centre. A triangle straddling the scissor edge therefore vanished. **Change:** triangles are clipped as polygons against the scissor, interpolating UV, glint UV and depth. The blend ranges for foil items are remapped after the clip so they stay correct. Zero-area triangles are skipped, and triangles fully inside or outside the scissor behave as before. One new test. **Tested:** `cargo fmt --check` and `cargo clippy -p horizon-client-render --all-targets -- -D warnings` pass. `cargo test -p horizon-client-render --lib hud::` passes (21). **Not tested:** no in-game run, so the scroll-edge and foil rendering are not checked visually. Only `horizon-client-render` was tested, not `horizon-client`. `tools/pr_ready.py` not run. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:13:10 +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#5523
No description provided.