[PR #1564] [MERGED] Renderer: remove the section face groups modelled on another renderer #3590

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1564
Author: @ludovic111
Created: 10/24/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @ludovic111

Base: main ← Head: pa1/remove-face-groups


📝 Commits (2)

  • 7a1638a Renderer: remove the section face groups modelled on another renderer
  • db758a6 Merge remote-tracking branch 'origin/main' into pa1/remove-face-groups

📊 Changes

6 files changed (+15 additions, -305 deletions)

View changed files

📝 crates/horizon-client/src/gfx.rs (+13 -19)
📝 crates/horizon-client/src/lod.rs (+0 -4)
📝 crates/horizon-client/src/lod/mesh.rs (+1 -3)
📝 crates/horizon-client/src/mesher.rs (+0 -11)
➖ crates/horizon-client/src/mesher/facing.rs (+0 -267)
📝 crates/horizon-client/src/mesher/leaf_culling_tests.rs (+1 -1)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Part of the provenance audit (code built from other mods' source). This one costs frame time: Ludovic decides whether it merges now or waits for a clean-room replacement.

What

#503 grouped each section's solid quads by the axis side they face and left out the groups facing away from the eye. Its module doc, commit and PR body all named an internal class of another renderer as the model (the name is left out here on purpose). Under the rule of 2026-10-24 (no other project's code, never name their internals), that code goes:

  • mesher/facing.rs is deleted; SectionMesh loses faces, and Mesher::mesh keeps the quads in model order (the former tesselate).
  • The renderer draws each section's and each LOD tile's solid quads in one draw, as before #503 and as vanilla does. Back faces are still discarded by the GPU's back-face culling, so the picture is unchanged; only the vertex work for them comes back.

Cost (measured)

Mac mini M4 Pro, Metal, horizon-client --benchmark standard --offscreen, 1280x720, seed 1234, the four standard flights of 12 s. Fast-profile builds of origin/main (535f2d2a0) and of this branch, run alternately, two rounds, each run in fresh temporary folders. The machine was shared with other agents' builds and harnesses (load 14 to 30), so single runs swing; the direction is the same in every pair at render distance 32.

RD Scene Avg FPS, main (2 runs) Avg FPS, this PR (2 runs) Change GPU p50 ms, main GPU p50 ms, this PR
16 village 1212, 787 1026, 956 -1% 0.95 0.89
16 forest 773, 533 649, 469 -14% 1.63 1.77
16 ocean 822, 924 745, 486 -29% 1.16 1.66
16 mountain 1235, 989 675, 1315 -10% 0.77 1.04
32 village 586, 664 468, 366 -33% 1.41 2.48
32 forest 241, 356 222, 238 -23% 3.26 4.30
32 ocean 395, 401 240, 283 -34% 2.26 3.91
32 mountain 1169, 1198 520, 1102 -31% 0.62 1.14

At render distance 32 the world pass is vertex-bound, and the GPU's median frame time rises by 30 to 85%. #503 had measured 29 to 36% fewer solid quads reaching the GPU at RD 8 to 32.

For a clean-room rewrite: the spec should come from vanilla and from first principles only (a quad in the plane x = p facing +X is front-facing only while the eye is at x > p, so back-facing groups can be skipped before vertex shading), written by someone who hasn't read this code, its history or any other renderer's.

Conflicts

This PR edits mesher/leaf_culling_tests.rs (one call renamed), which #1563 deletes. Whichever merges second gets a modify/delete conflict whose answer is to keep the deletion; I'll resolve it on the second branch.

Main was merged in after #1561 (shader packs removed); the conflicts were a few lines each.

Self-check

cargo fmt --all --check                                         ok
cargo clippy -p horizon-client --all-targets -- -D warnings     ok
cargo test -p horizon-client --lib --tests                      1058 + 99 + 18 + 2 + 2 + 2 + 1 passed (after merging main with #1561)
integration commit (main + #1558 #1559 #1560 #1563 #1564)       workspace clippy -D warnings ok, fast client build ok, horizon-mods tests ok
parity (CI, this head)                                          pass

No label: players see the frame rate change.

Needs from Ludovic: merge now and take the frame-time cost, or keep #503's code until a clean-room version is ready.

🤖 Generated with Claude Code


🔄 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/1564 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/24/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `pa1/remove-face-groups` --- ### 📝 Commits (2) - [`7a1638a`](https://github.com/horizon-rust/horizon/commit/7a1638a1908f5183102b7f649a79c4d95db8fe7c) Renderer: remove the section face groups modelled on another renderer - [`db758a6`](https://github.com/horizon-rust/horizon/commit/db758a622f9b7a42805e152da080a4074fa38b75) Merge remote-tracking branch 'origin/main' into pa1/remove-face-groups ### 📊 Changes **6 files changed** (+15 additions, -305 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/gfx.rs` (+13 -19) 📝 `crates/horizon-client/src/lod.rs` (+0 -4) 📝 `crates/horizon-client/src/lod/mesh.rs` (+1 -3) 📝 `crates/horizon-client/src/mesher.rs` (+0 -11) ➖ `crates/horizon-client/src/mesher/facing.rs` (+0 -267) 📝 `crates/horizon-client/src/mesher/leaf_culling_tests.rs` (+1 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Part of the provenance audit (code built from other mods' source). **This one costs frame time: Ludovic decides whether it merges now or waits for a clean-room replacement.** ## What #503 grouped each section's solid quads by the axis side they face and left out the groups facing away from the eye. Its module doc, commit and PR body all named an internal class of another renderer as the model (the name is left out here on purpose). Under the rule of 2026-10-24 (no other project's code, never name their internals), that code goes: - `mesher/facing.rs` is deleted; `SectionMesh` loses `faces`, and `Mesher::mesh` keeps the quads in model order (the former `tesselate`). - The renderer draws each section's and each LOD tile's solid quads in one draw, as before #503 and as vanilla does. Back faces are still discarded by the GPU's back-face culling, so the picture is unchanged; only the vertex work for them comes back. ## Cost (measured) Mac mini M4 Pro, Metal, `horizon-client --benchmark standard --offscreen`, 1280x720, seed 1234, the four standard flights of 12 s. Fast-profile builds of origin/main (535f2d2a0) and of this branch, run alternately, two rounds, each run in fresh temporary folders. The machine was shared with other agents' builds and harnesses (load 14 to 30), so single runs swing; the direction is the same in every pair at render distance 32. | RD | Scene | Avg FPS, main (2 runs) | Avg FPS, this PR (2 runs) | Change | GPU p50 ms, main | GPU p50 ms, this PR | |---|---|---|---|---:|---:|---:| | 16 | village | 1212, 787 | 1026, 956 | -1% | 0.95 | 0.89 | | 16 | forest | 773, 533 | 649, 469 | -14% | 1.63 | 1.77 | | 16 | ocean | 822, 924 | 745, 486 | -29% | 1.16 | 1.66 | | 16 | mountain | 1235, 989 | 675, 1315 | -10% | 0.77 | 1.04 | | 32 | village | 586, 664 | 468, 366 | -33% | 1.41 | 2.48 | | 32 | forest | 241, 356 | 222, 238 | -23% | 3.26 | 4.30 | | 32 | ocean | 395, 401 | 240, 283 | -34% | 2.26 | 3.91 | | 32 | mountain | 1169, 1198 | 520, 1102 | -31% | 0.62 | 1.14 | At render distance 32 the world pass is vertex-bound, and the GPU's median frame time rises by 30 to 85%. #503 had measured 29 to 36% fewer solid quads reaching the GPU at RD 8 to 32. **For a clean-room rewrite:** the spec should come from vanilla and from first principles only (a quad in the plane `x = p` facing +X is front-facing only while the eye is at `x > p`, so back-facing groups can be skipped before vertex shading), written by someone who hasn't read this code, its history or any other renderer's. ## Conflicts This PR edits `mesher/leaf_culling_tests.rs` (one call renamed), which #1563 deletes. Whichever merges second gets a modify/delete conflict whose answer is to keep the deletion; I'll resolve it on the second branch. Main was merged in after #1561 (shader packs removed); the conflicts were a few lines each. ## Self-check ``` cargo fmt --all --check ok cargo clippy -p horizon-client --all-targets -- -D warnings ok cargo test -p horizon-client --lib --tests 1058 + 99 + 18 + 2 + 2 + 2 + 1 passed (after merging main with #1561) integration commit (main + #1558 #1559 #1560 #1563 #1564) workspace clippy -D warnings ok, fast client build ok, horizon-mods tests ok parity (CI, this head) pass ``` No label: players see the frame rate change. Needs from Ludovic: merge now and take the frame-time cost, or keep #503's code until a clean-room version is ready. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:10: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#3590
No description provided.