[PR #2726] [MERGED] Draw dirt path sides without the alpha cutout so their top edge stays solid #4569

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

📋 Pull Request Information

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

Base: main ← Head: fix/2709-dirtpath


📝 Commits (2)

  • 377fecb Draw a quad over fully opaque texels without the alpha cutout
  • 1d52fe8 Merge main into fix/2709-dirtpath

📊 Changes

3 files changed (+30 additions, -4 deletions)

View changed files

📝 crates/horizon-client/src/mesher.rs (+4 -3)
📝 crates/horizon-client/src/models/catalog.rs (+3 -1)
📝 crates/horizon-client/src/sprites.rs (+23 -0)

📄 Description

What and why

The sides of a dirt path block went see-through along their top edge when looked at from above at an angle, and more with a higher FOV.

The dirt path's side faces use UVs that start one texel down ([0, 1, 16, 16]), because the first row of dirt_path_side.png is fully clear. Horizon alpha-tested every quad that used a sprite with a clear texel, and mip filtering mixes that clear row into the top edge of the face at a distance or a wide FOV, so the edge pixels were discarded.

Vanilla decides the layer of each quad from the texels under its own UVs. Here a face now counts as opaque when every texel under its UVs is opaque in every frame, and the terrain vertex then skips the alpha cutout (the same bit opaque leaves already use). Faces that really have clear texels under them are unchanged.

Fixes #2709.

Vanilla reference

  • FaceBakery.computeMaterialTransparency and SpriteContents.computeTransparency(u0, v0, u1, v1)
  • template_cube_bottom_top_indented.json (the dirt path model)

Self-check

cargo check -p horizon-client passes.


🔄 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/2726 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/2709-dirtpath` --- ### 📝 Commits (2) - [`377fecb`](https://github.com/horizon-rust/horizon/commit/377fecbf7914e49fc3bdceece33252b234db599c) Draw a quad over fully opaque texels without the alpha cutout - [`1d52fe8`](https://github.com/horizon-rust/horizon/commit/1d52fe81016e964c94e1b8bdccae2bdfd7e14541) Merge main into fix/2709-dirtpath ### 📊 Changes **3 files changed** (+30 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mesher.rs` (+4 -3) 📝 `crates/horizon-client/src/models/catalog.rs` (+3 -1) 📝 `crates/horizon-client/src/sprites.rs` (+23 -0) </details> ### 📄 Description ## What and why The sides of a dirt path block went see-through along their top edge when looked at from above at an angle, and more with a higher FOV. The dirt path's side faces use UVs that start one texel down (`[0, 1, 16, 16]`), because the first row of `dirt_path_side.png` is fully clear. Horizon alpha-tested every quad that used a sprite with a clear texel, and mip filtering mixes that clear row into the top edge of the face at a distance or a wide FOV, so the edge pixels were discarded. Vanilla decides the layer of each quad from the texels under its own UVs. Here a face now counts as opaque when every texel under its UVs is opaque in every frame, and the terrain vertex then skips the alpha cutout (the same bit opaque leaves already use). Faces that really have clear texels under them are unchanged. Fixes #2709. ## Vanilla reference - `FaceBakery.computeMaterialTransparency` and `SpriteContents.computeTransparency(u0, v0, u1, v1)` - `template_cube_bottom_top_indented.json` (the dirt path model) ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:18:07 +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#4569
No description provided.