[PR #42] [CLOSED] Fix camera flips, block breaking visuals, and cloud face culling #2290

Closed
opened 2026-11-02 15:54:39 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/42
Author: @Online5277
Created: 10/13/2026
Status: ❌ Closed

Base: main ← Head: fix/vanilla-camera-cracks-clouds


📝 Commits (4)

  • 17f0029 Fix vertical camera flip, breaking crack blending and cloud face culling
  • 7f7cdf0 Merge remote-tracking branch 'origin/main' into fix/vanilla-camera-cracks-clouds
  • b797839 fix(client): follow block shapes for cracks and terrain particles
  • 870f2b4 Merge remote-tracking branch 'origin/main' into fix/vanilla-camera-cracks-clouds

📊 Changes

19 files changed (+1234 additions, -236 deletions)

View changed files

➕ crates/horizon-client/examples/block_particles_fixture.rs (+61 -0)
➕ crates/horizon-client/examples/breaking_fixture.rs (+74 -0)
➕ crates/horizon-client/examples/cloud_fixture.rs (+34 -0)
📝 crates/horizon-client/src/blocks.rs (+12 -8)
➕ crates/horizon-client/src/breaking.rs (+108 -0)
📝 crates/horizon-client/src/camera.rs (+28 -0)
➕ crates/horizon-client/src/clouds.rs (+81 -0)
📝 crates/horizon-client/src/entity.wgsl (+6 -2)
📝 crates/horizon-client/src/game.rs (+128 -161)
📝 crates/horizon-client/src/gfx.rs (+184 -64)
📝 crates/horizon-client/src/lib.rs (+2 -0)
📝 crates/horizon-client/src/particles.rs (+133 -0)
➕ mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockParticlesOracle.java (+85 -0)
➕ mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBreakingModelOracle.java (+89 -0)
➕ mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCloudRenderOracle.java (+52 -0)
📝 mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGameplayFactsExporter.java (+8 -1)
➕ tools/test_block_particles_parity.py (+56 -0)
➕ tools/test_breaking_model_parity.py (+62 -0)
➕ tools/test_cloud_render_parity.py (+31 -0)

📄 Description

Summary

Fix the three original client issues, plus two follow-up issues with non-full blocks:

  • Looking straight up/down flips the rendered view by 180 degrees.
  • Breaking animations add a gray glow over the block.
  • Cloud faces appear through other cloud cells.
  • Breaking cracks float in the empty space around slabs and other non-full models.
  • Mining and destruction particles use full-cube positions/density for slabs, trapdoors and other partial blocks.

Changes

  • Use the conjugate of vanilla Camera.rotation for world, sky and hand views instead of a fixed-world-up look-at. Test both vertical pitch limits.
  • Render cracks with vanilla CRUMBLING multiplicative blending, unlit white vertex colour, no depth writes and depth bias.
  • Emit cracks from the selected baked model quads, including model offsets and multipart/weighted selection, with vanilla projected decal UVs. Visit every cull group without neighbour-culling the overlay; draw translucent-model cracks after translucent terrain.
  • Place mining crumbs using the outline bounding box, sampling all three coordinates before overriding the hit-face coordinate with vanilla float margins. Generate destruction bursts per outline box with vanilla per-axis density and width caps instead of a fixed 4x4x4 cube.
  • Keep exported outline coordinates in double precision. Distinguish model offsets from outline offsets: tall flowers have offset models but unshifted outlines. Apply the corrected outline metadata to particles, picking and selection outlines.
  • Render clouds with back-face culling and vanilla exterior/interior face selection, nearest-first traversal and occupancy alpha threshold.
  • Add regression tests and differential oracles invoking the shipped client block-model renderer, decal generator, particle-effect methods and cloud mesh builder. Fix a one-line Clippy warning in the existing cloud fixture.

Merged current upstream main (a96580aa), including the preparation fixes for platform-specific libraries and republished 26.3 manifests. No rebase/force-push, new dependencies, game-derived files or personal settings included.

Validation

After the upstream merge:

  • Offline gate passed: public-tree check, formatting, workspace Clippy, Rust tests, doctests and Python tests.
  • Normal resource preparation passed; the comparisons ran directly with the updated tooling, without the previous private metadata/platform workaround.
  • Model-shaped breaking comparison: 2,740 state/position cases, 155,928 vertices; passed three consecutive runs. Checks geometry, winding, offsets, projected UVs, white/fullbright vertices and translucent phase. Maximum numerical error: 1.40395e-7 (comparison tolerance 1e-4).
  • Terrain-particle comparison: 2,740 cases, 16,212 mining crumbs and 144,968 destruction crumbs; passed three consecutive runs. Enqueue positions match exactly, as do counts/order and subsequent position-RNG values for all six hit faces.
  • Camera comparison: 18,646 cases / 150,863 matching output lines.
  • First-person comparison: 4,192 cases / 380,326 matching output lines.
  • Cloud comparison: 3,180 matching cases; rerun after merging upstream. The original cloud fix also passed three consecutive runs.
  • GTX 1660 SUPER / Vulkan smoke checks and inspected screenshots: bottom/top slabs, stairs, fences, panes, carpet and an anvil for model-shaped cracks; before/after top-face mining of bottom slabs and closed bottom trapdoors for particle placement. Clean exits.
  • The contributor manually tested and confirmed the original three fixes; follow-up fixes have automated/oracle/GPU validation but have not yet been manually confirmed by the contributor.

Scope

No complete framebuffer comparison, other-platform validation or full parity audit. Special block-entity-rendered breaking overlays such as chests remain outside this change. The particle oracle stubs sprite/tint lookup and does not compare particle-local constructor RNG, randomized velocities, lifetime/ticks or persistent gameplay RNG integration. The cloud oracle covers face selection, inside-face flags and mesh traversal.

Retesting

Refresh cached gameplay facts to pick up the corrected outline metadata, then rebuild/run:

python3 tools/prepare_native_client.py
cargo run --profile fast -p horizon-client

🔄 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/42 **Author:** [@Online5277](https://github.com/Online5277) **Created:** 10/13/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/vanilla-camera-cracks-clouds` --- ### 📝 Commits (4) - [`17f0029`](https://github.com/horizon-rust/horizon/commit/17f0029d08f63ed2931f7af09cdf55f937a1e985) Fix vertical camera flip, breaking crack blending and cloud face culling - [`7f7cdf0`](https://github.com/horizon-rust/horizon/commit/7f7cdf01c250bea2db41e702b7768cc7207d2baf) Merge remote-tracking branch 'origin/main' into fix/vanilla-camera-cracks-clouds - [`b797839`](https://github.com/horizon-rust/horizon/commit/b797839f776a7bc6ca32d79c5a47c7f3f19299c3) fix(client): follow block shapes for cracks and terrain particles - [`870f2b4`](https://github.com/horizon-rust/horizon/commit/870f2b45f788bee8595bfe5801086a65a7b430d4) Merge remote-tracking branch 'origin/main' into fix/vanilla-camera-cracks-clouds ### 📊 Changes **19 files changed** (+1234 additions, -236 deletions) <details> <summary>View changed files</summary> ➕ `crates/horizon-client/examples/block_particles_fixture.rs` (+61 -0) ➕ `crates/horizon-client/examples/breaking_fixture.rs` (+74 -0) ➕ `crates/horizon-client/examples/cloud_fixture.rs` (+34 -0) 📝 `crates/horizon-client/src/blocks.rs` (+12 -8) ➕ `crates/horizon-client/src/breaking.rs` (+108 -0) 📝 `crates/horizon-client/src/camera.rs` (+28 -0) ➕ `crates/horizon-client/src/clouds.rs` (+81 -0) 📝 `crates/horizon-client/src/entity.wgsl` (+6 -2) 📝 `crates/horizon-client/src/game.rs` (+128 -161) 📝 `crates/horizon-client/src/gfx.rs` (+184 -64) 📝 `crates/horizon-client/src/lib.rs` (+2 -0) 📝 `crates/horizon-client/src/particles.rs` (+133 -0) ➕ `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockParticlesOracle.java` (+85 -0) ➕ `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBreakingModelOracle.java` (+89 -0) ➕ `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCloudRenderOracle.java` (+52 -0) 📝 `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGameplayFactsExporter.java` (+8 -1) ➕ `tools/test_block_particles_parity.py` (+56 -0) ➕ `tools/test_breaking_model_parity.py` (+62 -0) ➕ `tools/test_cloud_render_parity.py` (+31 -0) </details> ### 📄 Description ## Summary Fix the three original client issues, plus two follow-up issues with non-full blocks: - Looking straight up/down flips the rendered view by 180 degrees. - Breaking animations add a gray glow over the block. - Cloud faces appear through other cloud cells. - Breaking cracks float in the empty space around slabs and other non-full models. - Mining and destruction particles use full-cube positions/density for slabs, trapdoors and other partial blocks. ## Changes - Use the conjugate of vanilla Camera.rotation for world, sky and hand views instead of a fixed-world-up look-at. Test both vertical pitch limits. - Render cracks with vanilla CRUMBLING multiplicative blending, unlit white vertex colour, no depth writes and depth bias. - Emit cracks from the selected baked model quads, including model offsets and multipart/weighted selection, with vanilla projected decal UVs. Visit every cull group without neighbour-culling the overlay; draw translucent-model cracks after translucent terrain. - Place mining crumbs using the outline bounding box, sampling all three coordinates before overriding the hit-face coordinate with vanilla float margins. Generate destruction bursts per outline box with vanilla per-axis density and width caps instead of a fixed 4x4x4 cube. - Keep exported outline coordinates in double precision. Distinguish model offsets from outline offsets: tall flowers have offset models but unshifted outlines. Apply the corrected outline metadata to particles, picking and selection outlines. - Render clouds with back-face culling and vanilla exterior/interior face selection, nearest-first traversal and occupancy alpha threshold. - Add regression tests and differential oracles invoking the shipped client block-model renderer, decal generator, particle-effect methods and cloud mesh builder. Fix a one-line Clippy warning in the existing cloud fixture. Merged current upstream main (a96580aa), including the preparation fixes for platform-specific libraries and republished 26.3 manifests. No rebase/force-push, new dependencies, game-derived files or personal settings included. ## Validation After the upstream merge: - Offline gate passed: public-tree check, formatting, workspace Clippy, Rust tests, doctests and Python tests. - Normal resource preparation passed; the comparisons ran directly with the updated tooling, without the previous private metadata/platform workaround. - Model-shaped breaking comparison: 2,740 state/position cases, 155,928 vertices; passed three consecutive runs. Checks geometry, winding, offsets, projected UVs, white/fullbright vertices and translucent phase. Maximum numerical error: 1.40395e-7 (comparison tolerance 1e-4). - Terrain-particle comparison: 2,740 cases, 16,212 mining crumbs and 144,968 destruction crumbs; passed three consecutive runs. Enqueue positions match exactly, as do counts/order and subsequent position-RNG values for all six hit faces. - Camera comparison: 18,646 cases / 150,863 matching output lines. - First-person comparison: 4,192 cases / 380,326 matching output lines. - Cloud comparison: 3,180 matching cases; rerun after merging upstream. The original cloud fix also passed three consecutive runs. - GTX 1660 SUPER / Vulkan smoke checks and inspected screenshots: bottom/top slabs, stairs, fences, panes, carpet and an anvil for model-shaped cracks; before/after top-face mining of bottom slabs and closed bottom trapdoors for particle placement. Clean exits. - The contributor manually tested and confirmed the original three fixes; follow-up fixes have automated/oracle/GPU validation but have not yet been manually confirmed by the contributor. ## Scope No complete framebuffer comparison, other-platform validation or full parity audit. Special block-entity-rendered breaking overlays such as chests remain outside this change. The particle oracle stubs sprite/tint lookup and does not compare particle-local constructor RNG, randomized velocities, lifetime/ticks or persistent gameplay RNG integration. The cloud oracle covers face selection, inside-face flags and mesh traversal. ## Retesting Refresh cached gameplay facts to pick up the corrected outline metadata, then rebuild/run: ```sh python3 tools/prepare_native_client.py cargo run --profile fast -p horizon-client ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:54:39 +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#2290
No description provided.