[PR #6456] WIP: partial transform parity corrections and unfinished #5950 handoff #6886

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6456
Author: @byMehd
Created: 11/1/2026
Status: 🔄 Open

Base: main ← Head: fix/5950-boat-trapdoor-depth


📝 Commits (1)

  • dccdf42 WIP: preserve vanilla transform parity corrections and #5950 handoff

📊 Changes

14 files changed (+360 additions, -33 deletions)

View changed files

📝 crates/horizon-client-render/src/camera.rs (+12 -2)
📝 crates/horizon-client-render/src/gfx.rs (+8 -1)
➕ crates/horizon-client/examples/probe/boat_floor_fixture.rs (+54 -0)
📝 crates/horizon-client/examples/probe/camera_probe.rs (+23 -0)
📝 crates/horizon-client/examples/probe/main.rs (+2 -0)
📝 crates/horizon-client/src/game/boats.rs (+2 -2)
📝 crates/horizon-client/src/mobs.rs (+46 -15)
📝 crates/horizon-client/src/mobs/render.rs (+3 -12)
➕ docs/investigations/5950/handoff.md (+78 -0)
➕ docs/investigations/5950/render-still-broken.png (+0 -0)
➕ mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBoatFloorOracle.java (+61 -0)
📝 mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCameraOracle.java (+3 -0)
➕ tools/test_boat_floor_parity.py (+66 -0)
📝 tools/test_camera_parity.py (+2 -1)

📄 Description

🤖 Opened by byMehd's AI agent (Codex, GPT-6), not by byMehd personally.

What and why

UNFINISHED HANDOFF — the rendering defect is still present. This draft is not a completed solution and is not ready to merge.

Related to #5950. The contributor asked the agent to stop, preserve the work publicly and release the claim so someone else can finish. There is deliberately no closing reference.

This preserves partial, independently checked parity corrections:

  • Both model draw paths retain JOML's rounded quaternion length and follow its position-operation order.
  • Camera view matrices and boat Y-axis rotations follow the corresponding vanilla/JOML operations.
  • The world renderer now uses the projection implementation already checked against vanilla.
  • A new boat-floor oracle/probe checks exact vertex positions; the camera harness now checks the actual renderer projection as well.

The numeric corrections do not eliminate the visual fault. Oblique views still show the trapdoor through the floor. No boat position offset or depth bias was added.

Detailed reproduction, findings, validation limits and remaining leads: handoff report.

Kind

  • parity: partial verified parity corrections; the reported rendering issue remains unresolved
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players
  • extra: Horizon-only, off by default
  • tooling
  • docs

Vanilla reference

Pinned 26.3 client bytecode: AbstractBoatRenderer.submit, BoatModel.createBoatModel, ModelPart.translateAndRotate, ModelPart.Cube.compile, Camera.getViewRotationMatrix, Projection.getMatrix, MainTarget and the default depth state.

Important correction to the initial investigation: vanilla also uses D32_FLOAT, reversed depth, GREATER_THAN_OR_EQUAL, and zero default depth bias.

Harnesses: tools/test_boat_floor_parity.py, tools/test_camera_parity.py, tools/test_entity_model_parity.py.

Other projects' code

None. Existing Horizon JOML-compatible arithmetic was reused; game bytecode/resources were inspected locally. No jars, assets, prepared resources, decompiled sources, player saves or credentials are included. The PNG is a reproduction screenshot.

Self-check

Final handoff evidence:

  • Boat floor: 36 root transforms / 1,728 vertices, both draw paths match vanilla positions exactly.
  • Camera: 18,646 cases / 188,413 output lines match, including view rotation and the actual renderer projection.
  • Entity models after the position arithmetic correction: 2,101 cases / 49 layers pass.
  • Targeted model-lighting tests after that correction: 5 pass.
  • The final gameplay code builds with MSVC. Public-tree checks and whitespace checks pass.
  • Clippy passed after the model-position correction, before the later camera/root/projection changes.
  • The complete final-head gate has not been run. The rendering reproduction still fails, so this remains a draft.

The following is the requested pr_ready block from an earlier working tree, before the later refinements. It is retained as evidence, not a final-head green result:

pr_ready (tools/pr_ready.py --quick on DESKTOP-QDRAJUE, against origin/main at ac2f22371, 29 min 55 s)

Check Result
Scope ✅ 6 files, +192 −19
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 594 passed (6 min 8 s)
rustfmt ✅ (37 s)
clippy ✅ (5 min 27 s)
tests: horizon-client-lib ✅ 1273 passed (16 min 54 s)
doc tests ✅ 0 passed (42 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix; maintainer decides release timing

Screenshots

Current residual defect, after the partial corrections — this is not an “after/fixed” image:

Rendering still broken

The report includes the exact boat position and camera angles. Remaining leads are explicitly hypotheses: GPU versus CPU matrix composition, terrain camera-offset rounding, and the sequential quad index order. They were not implemented or established as causes.

🤖 Generated with Codex


🔄 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/6456 **Author:** [@byMehd](https://github.com/byMehd) **Created:** 11/1/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/5950-boat-trapdoor-depth` --- ### 📝 Commits (1) - [`dccdf42`](https://github.com/horizon-rust/horizon/commit/dccdf427b9c16b189b82485228c4f3b7bcdb82e5) WIP: preserve vanilla transform parity corrections and #5950 handoff ### 📊 Changes **14 files changed** (+360 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/camera.rs` (+12 -2) 📝 `crates/horizon-client-render/src/gfx.rs` (+8 -1) ➕ `crates/horizon-client/examples/probe/boat_floor_fixture.rs` (+54 -0) 📝 `crates/horizon-client/examples/probe/camera_probe.rs` (+23 -0) 📝 `crates/horizon-client/examples/probe/main.rs` (+2 -0) 📝 `crates/horizon-client/src/game/boats.rs` (+2 -2) 📝 `crates/horizon-client/src/mobs.rs` (+46 -15) 📝 `crates/horizon-client/src/mobs/render.rs` (+3 -12) ➕ `docs/investigations/5950/handoff.md` (+78 -0) ➕ `docs/investigations/5950/render-still-broken.png` (+0 -0) ➕ `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBoatFloorOracle.java` (+61 -0) 📝 `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCameraOracle.java` (+3 -0) ➕ `tools/test_boat_floor_parity.py` (+66 -0) 📝 `tools/test_camera_parity.py` (+2 -1) </details> ### 📄 Description > 🤖 Opened by byMehd's AI agent (Codex, GPT-6), not by byMehd personally. ## What and why **UNFINISHED HANDOFF — the rendering defect is still present. This draft is not a completed solution and is not ready to merge.** Related to #5950. The contributor asked the agent to stop, preserve the work publicly and release the claim so someone else can finish. There is deliberately no closing reference. This preserves partial, independently checked parity corrections: - Both model draw paths retain JOML's rounded quaternion length and follow its position-operation order. - Camera view matrices and boat Y-axis rotations follow the corresponding vanilla/JOML operations. - The world renderer now uses the projection implementation already checked against vanilla. - A new boat-floor oracle/probe checks exact vertex positions; the camera harness now checks the actual renderer projection as well. **The numeric corrections do not eliminate the visual fault.** Oblique views still show the trapdoor through the floor. No boat position offset or depth bias was added. Detailed reproduction, findings, validation limits and remaining leads: [handoff report](https://github.com/byMehd/horizon/blob/dccdf427b9c16b189b82485228c4f3b7bcdb82e5/docs/investigations/5950/handoff.md). ## Kind - [x] parity: partial verified parity corrections; the reported rendering issue remains unresolved - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players - [ ] extra: Horizon-only, off by default - [ ] tooling - [ ] docs ## Vanilla reference Pinned 26.3 client bytecode: `AbstractBoatRenderer.submit`, `BoatModel.createBoatModel`, `ModelPart.translateAndRotate`, `ModelPart.Cube.compile`, `Camera.getViewRotationMatrix`, `Projection.getMatrix`, `MainTarget` and the default depth state. Important correction to the initial investigation: vanilla also uses D32_FLOAT, reversed depth, GREATER_THAN_OR_EQUAL, and zero default depth bias. Harnesses: `tools/test_boat_floor_parity.py`, `tools/test_camera_parity.py`, `tools/test_entity_model_parity.py`. ## Other projects' code None. Existing Horizon JOML-compatible arithmetic was reused; game bytecode/resources were inspected locally. No jars, assets, prepared resources, decompiled sources, player saves or credentials are included. The PNG is a reproduction screenshot. ## Self-check Final handoff evidence: - Boat floor: 36 root transforms / 1,728 vertices, both draw paths match vanilla positions exactly. - Camera: 18,646 cases / 188,413 output lines match, including view rotation and the actual renderer projection. - Entity models after the position arithmetic correction: 2,101 cases / 49 layers pass. - Targeted model-lighting tests after that correction: 5 pass. - The final gameplay code builds with MSVC. Public-tree checks and whitespace checks pass. - Clippy passed after the model-position correction, before the later camera/root/projection changes. - **The complete final-head gate has not been run.** The rendering reproduction still fails, so this remains a draft. The following is the requested `pr_ready` block from an **earlier working tree**, before the later refinements. It is retained as evidence, **not a final-head green result**: **pr_ready** (`tools/pr_ready.py --quick` on DESKTOP-QDRAJUE, against origin/main at ac2f22371, 29 min 55 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +192 −19 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 594 passed (6 min 8 s) | | rustfmt | ✅ (37 s) | | clippy | ✅ (5 min 27 s) | | tests: horizon-client-lib | ✅ 1273 passed (16 min 54 s) | | doc tests | ✅ 0 passed (42 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: feature if players get something new, no label for a fix; maintainer decides release timing | ## Screenshots **Current residual defect, after the partial corrections** — this is not an “after/fixed” image: ![Rendering still broken](https://raw.githubusercontent.com/byMehd/horizon/dccdf427b9c16b189b82485228c4f3b7bcdb82e5/docs/investigations/5950/render-still-broken.png) The report includes the exact boat position and camera angles. Remaining leads are explicitly hypotheses: GPU versus CPU matrix composition, terrain camera-offset rounding, and the sequential quad index order. They were not implemented or established as causes. 🤖 Generated with [Codex](https://openai.com/codex/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#6886
No description provided.