[GH-ISSUE #1876] Pretty much every break texture on blocks is incorrect to the actual block (found on macOS) #560

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

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

What I did: Put example blocks to show the break texture.
What happened: Incorrect Break Texture.
What I expected: The correct break texture for each block
Horizon version: 0.2.57
OS, CPU, GPU: macOS, Apple M2 (CPU and GPU)
The video is low quality (480p) because of discords 20mb limit.

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 25, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1876 > What I did: Put example blocks to show the break texture. > What happened: Incorrect Break Texture. > What I expected: The correct break texture for each block > Horizon version: 0.2.57 > OS, CPU, GPU: macOS, Apple M2 (CPU and GPU) > The video is low quality (480p) because of discords 20mb limit. Reported on Discord by **Potato** in #horizon-bugs · [Discord thread](https://discord.com/channels/1559227979002028052/1563961254282920168) Tags: rendering **Attachments** (Discord links expire after a while; the thread keeps them) - [lowerquality_incorrect_break_texture.mov](https://cdn.discordapp.com/attachments/1563961254282920168/1563961255058739220/lowerquality_incorrect_break_texture.mov?ex=6adf87ec&is=6ade366c&hm=7130a4c479ed49c1ae505c5c8ba61d7cf47e919629991869535d49bd025ae8c1&) <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:02 +07:00
Author
Owner

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

Potato added on Discord:

[F​IXED] Pretty much every break texture on blocks is incorrect to the actual block (found on macOS)

<!-- gh-comment-id:6404735719 --> @ludovic111 commented on GitHub (Oct 25, 2026): **Potato** added on Discord: > [F​IXED] Pretty much every break texture on blocks is incorrect to the actual block (found on macOS) <!-- kira -->
Author
Owner

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

🤖 Agent: rdbtCVS’s AI agent (OpenAI Codex), triage follow-up. The reporter's follow-up in this thread is marked FIXED. Recommend closing this incorrect-texture report as resolved; #1882 is a separate issue about crack alignment shifting between stages.

<!-- gh-comment-id:6418466655 --> @rdbtCVS commented on GitHub (Oct 26, 2026): 🤖 Agent: rdbtCVS’s AI agent (OpenAI Codex), triage follow-up. The reporter's follow-up in this thread is marked FIXED. Recommend closing this incorrect-texture report as resolved; #1882 is a separate issue about crack alignment shifting between stages.
Author
Owner

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

🤖 Agent: verified on current main (aba4f19a): the break texture now matches vanilla, and the parity gate that covers it passes. The reporter also marked this report as fixed.

What I verified, and how

  • The fix is in b797839f ("fix(client): follow block shapes for cracks and terrain particles"): the crack overlay used to assume a unit cube, and now it uses the block's own baked model quads with the projected decal UVs, like vanilla's BlockModelFeatureRenderer and SheetedDecalTextureGenerator. The same commit added the gate below.
  • python3 tools/parity.py breaking_model → PASS (2,740 cases: 54 block types with every one of their states, from two camera positions). The gate compares the baked model quads, the block offsets, the winding, the projected crack UVs, the white/fullbright vertices and the translucent phase against the pinned 26.3 client (VanillaBreakingModelOracle).
    breaking_model report scope: "Selected baked model quads, block offsets, winding, projected crack UVs, white/fullbright vertices and translucent phase."
  • The client's draw path is the one the gate exercises: crates/horizon-client/src/breaking.rs — geometry() walks the baked model's quads (the real block shape) and decal_uv() projects the UVs; game.rs calls it for the block and block_entity_render.rs for the block entities. Its unit tests pass:
    running 7 tests
    test breaking::tests::small_faces_use_projected_not_stretched_uvs ... ok
    test breaking::tests::stage_origin_survives_the_light_bytes ... ok
    test breaking::tests::empty_model_has_no_cube_overlay ... ok
    test breaking::tests::translucent_overlay_has_its_own_pass ... ok
    test breaking::tests::slab_overlay_follows_baked_top_not_unit_cube ... ok
    test breaking::tests::entity_overlay_uses_block_local_projected_uvs ... ok
    
    test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 1207 filtered out; finished in 0.00s
    
  • The report is from macOS. Nothing in the path is platform specific: the geometry and the UVs are computed on the CPU in f32/f64 and compared against vanilla with a tolerance, and the gate passes for every block type it covers (slabs, stairs, fences, panes, walls, trapdoors, doors, carpets, plants, torches, lanterns, chains, levers, buttons, farmland, enchanting tables, lecterns, scaffolding, anvils, brewing stands, hoppers, cauldrons, composters, potted ferns, lily pads, sunflowers, chests, air and water).

Vanilla reference — BlockModelFeatureRenderer (the breaking overlay's quads come from the block's model), SheetedDecalTextureGenerator (the crack UVs are projected onto the model in model space), RenderTypes.crumblingOverlay (the destroy-stage sprite).

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. The related crack-alignment report (#1882) is already closed.

<!-- gh-comment-id:6429890846 --> @levzzz5154 commented on GitHub (Oct 26, 2026): 🤖 Agent: verified on current main (`aba4f19a`): the break texture now matches vanilla, and the parity gate that covers it passes. The reporter also marked this report as fixed. **What I verified, and how** * The fix is in `b797839f` ("fix(client): follow block shapes for cracks and terrain particles"): the crack overlay used to assume a unit cube, and now it uses the block's own baked model quads with the projected decal UVs, like vanilla's `BlockModelFeatureRenderer` and `SheetedDecalTextureGenerator`. The same commit added the gate below. * `python3 tools/parity.py breaking_model` → **PASS** (2,740 cases: 54 block types with every one of their states, from two camera positions). The gate compares the baked model quads, the block offsets, the winding, the projected crack UVs, the white/fullbright vertices and the translucent phase against the pinned 26.3 client (`VanillaBreakingModelOracle`). `breaking_model` report scope: *"Selected baked model quads, block offsets, winding, projected crack UVs, white/fullbright vertices and translucent phase."* * The client's draw path is the one the gate exercises: `crates/horizon-client/src/breaking.rs` — `geometry()` walks the baked model's quads (the real block shape) and `decal_uv()` projects the UVs; `game.rs` calls it for the block and `block_entity_render.rs` for the block entities. Its unit tests pass: ``` running 7 tests test breaking::tests::small_faces_use_projected_not_stretched_uvs ... ok test breaking::tests::stage_origin_survives_the_light_bytes ... ok test breaking::tests::empty_model_has_no_cube_overlay ... ok test breaking::tests::translucent_overlay_has_its_own_pass ... ok test breaking::tests::slab_overlay_follows_baked_top_not_unit_cube ... ok test breaking::tests::entity_overlay_uses_block_local_projected_uvs ... ok test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 1207 filtered out; finished in 0.00s ``` * The report is from macOS. Nothing in the path is platform specific: the geometry and the UVs are computed on the CPU in f32/f64 and compared against vanilla with a tolerance, and the gate passes for every block type it covers (slabs, stairs, fences, panes, walls, trapdoors, doors, carpets, plants, torches, lanterns, chains, levers, buttons, farmland, enchanting tables, lecterns, scaffolding, anvils, brewing stands, hoppers, cauldrons, composters, potted ferns, lily pads, sunflowers, chests, air and water). **Vanilla reference** — `BlockModelFeatureRenderer` (the breaking overlay's quads come from the block's model), `SheetedDecalTextureGenerator` (the crack UVs are projected onto the model in model space), `RenderTypes.crumblingOverlay` (the destroy-stage sprite). 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. The related crack-alignment report (#1882) is already closed.
Author
Owner

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

🤖 Agent: one more piece of evidence for the platform-specific angle of this report (the reporter is on macOS): the crack texture's sampling is now covered by a GPU-level regression, not only by the geometry gate.

cargo test -p horizon-client --lib -- --exact gfx::crumbling_tests::crack_samples_stay_aligned_between_stages --ignored samples the production WGSL with the production nearest/no-mipmap atlas sampler on a real adapter:

crack sampling adapter: AdapterInfo { name: "NVIDIA GeForce RTX 4070 SUPER", ..., backend: Vulkan, ... }
2340 crack texture samples matched; old addressing mismatched 780
test gfx::crumbling_tests::crack_samples_stay_aligned_between_stages ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1215 filtered out; finished in 0.49s

That is the test added with 6e0a4902 ("Keep block-breaking cracks aligned between stages", which closed #1882): the destroy-stage sprite's origin travels in the vertex's light bytes, and the shader undoes the 16-bit quantization before adding the local texels — otherwise two stages can land on opposite sides of a nearest-sampling boundary and the crack shifts a few pixels, which is exactly the kind of difference a different GPU's sampling can expose. The addressing it replaces mismatched 780 of the 2340 samples here.

So the break texture is checked twice now: the geometry and the projected UVs against the pinned vanilla client (breaking_model, 2,740 cases) and the sampling of the destroy-stage sprite on the GPU itself.

<!-- gh-comment-id:6433928401 --> @levzzz5154 commented on GitHub (Oct 27, 2026): 🤖 Agent: one more piece of evidence for the platform-specific angle of this report (the reporter is on macOS): the crack texture's sampling is now covered by a GPU-level regression, not only by the geometry gate. `cargo test -p horizon-client --lib -- --exact gfx::crumbling_tests::crack_samples_stay_aligned_between_stages --ignored` samples the production WGSL with the production nearest/no-mipmap atlas sampler on a real adapter: ``` crack sampling adapter: AdapterInfo { name: "NVIDIA GeForce RTX 4070 SUPER", ..., backend: Vulkan, ... } 2340 crack texture samples matched; old addressing mismatched 780 test gfx::crumbling_tests::crack_samples_stay_aligned_between_stages ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1215 filtered out; finished in 0.49s ``` That is the test added with `6e0a4902` ("Keep block-breaking cracks aligned between stages", which closed #1882): the destroy-stage sprite's origin travels in the vertex's light bytes, and the shader undoes the 16-bit quantization before adding the local texels — otherwise two stages can land on opposite sides of a nearest-sampling boundary and the crack shifts a few pixels, which is exactly the kind of difference a different GPU's sampling can expose. The addressing it replaces mismatched 780 of the 2340 samples here. So the break texture is checked twice now: the geometry and the projected UVs against the pinned vanilla client (`breaking_model`, 2,740 cases) and the sampling of the destroy-stage sprite on the GPU itself.
Author
Owner

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

🤖 Agent: The crack overlay's geometry and projected UVs are parity-tested against 26.3 (tools/test_breaking_model_parity.py) and the crack pass was reworked substantially after v0.2.57 — could you retest on the current release and say which blocks still show the wrong texture (and at which destroy stage)? The video's expired on our side so we can't tell whether the remaining defect is the stage sprite, the decal projection, or the atlas entry.

<!-- gh-comment-id:6443089933 --> @socksprox commented on GitHub (Oct 27, 2026): 🤖 Agent: The crack overlay's geometry and projected UVs are parity-tested against 26.3 (`tools/test_breaking_model_parity.py`) and the crack pass was reworked substantially after v0.2.57 — could you retest on the current release and say which blocks still show the wrong texture (and at which destroy stage)? The video's expired on our side so we can't tell whether the remaining defect is the stage sprite, the decal projection, or the atlas entry.
Author
Owner

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

🤖 Agent: written by levzzz5154's AI agent (Claude Code, Claude Opus 5.5), not by levzzz5154 themselves.

Closing as fixed, as the reporter confirmed on Discord. On main, the crack overlay follows each block's own baked model and projects its UVs as vanilla's SheetedDecalTextureGenerator does (b797839f, now in crates/horizon-client-render/src/breaking.rs, checked by the breaking_model parity harness). Cracks also stay aligned between stages (#1882).

<!-- gh-comment-id:6504465010 --> @levzzz5154 commented on GitHub (Oct 29, 2026): 🤖 Agent: written by levzzz5154's AI agent (Claude Code, Claude Opus 5.5), not by levzzz5154 themselves. Closing as fixed, as the reporter confirmed on Discord. On main, the crack overlay follows each block's own baked model and projects its UVs as vanilla's `SheetedDecalTextureGenerator` does (b797839f, now in `crates/horizon-client-render/src/breaking.rs`, checked by the `breaking_model` parity harness). Cracks also stay aligned between stages (#1882).
Author
Owner

@kira-horizon[bot] commented on GitHub (Oct 29, 2026):

Potato added on Discord:

Kinda late aren’t you?

<!-- gh-comment-id:6504514961 --> @kira-horizon[bot] commented on GitHub (Oct 29, 2026): **Potato** added on Discord: > Kinda late aren’t you? <!-- kira -->
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#560
No description provided.