[PR #420] [MERGED] Optional leaf and entity culling (Online5277's #387, rebased) #2551

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/420
Author: @ludovic111
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/16/2026
Merged by: @ludovic111

Base: main ← Head: contrib/cull-leaves-387


📝 Commits (3)

  • 504a70c Add an opt-in Cull Leaves graphics setting
  • 6aea14c Add conservative opt-in entity culling
  • 23cadd8 Keep entity culling description within the UI line limit

📊 Changes

26 files changed (+689 additions, -20 deletions)

View changed files

📝 README.md (+2 -0)
➕ THIRD_PARTY_NOTICES.md (+31 -0)
📝 crates/horizon-client/examples/chunk_bench.rs (+1 -0)
📝 crates/horizon-client/examples/section_mesh_fixture.rs (+1 -0)
➕ crates/horizon-client/src/entity_culling.rs (+266 -0)
📝 crates/horizon-client/src/game.rs (+32 -5)
📝 crates/horizon-client/src/game/armor_stands.rs (+2 -0)
📝 crates/horizon-client/src/game/backdrop.rs (+1 -0)
📝 crates/horizon-client/src/game/boats.rs (+2 -0)
📝 crates/horizon-client/src/game/creatures.rs (+6 -0)
➕ crates/horizon-client/src/game/entity_culling.rs (+51 -0)
📝 crates/horizon-client/src/game/frames.rs (+6 -0)
📝 crates/horizon-client/src/game/item_draw.rs (+2 -0)
📝 crates/horizon-client/src/game/lan.rs (+4 -0)
📝 crates/horizon-client/src/game/minecarts.rs (+2 -0)
📝 crates/horizon-client/src/game/paintings.rs (+2 -0)
📝 crates/horizon-client/src/gfx.rs (+3 -0)
📝 crates/horizon-client/src/graphics.rs (+14 -2)
📝 crates/horizon-client/src/graphics_ui.rs (+102 -0)
📝 crates/horizon-client/src/lib.rs (+1 -0)

...and 6 more files

📄 Description

Online5277's #387, rebased onto main by us because it conflicted with our merges and the fork branch isn't maintainer-editable. All three commits keep their author; the only change is the conflict in Graphics::serialize, where main's new shaderPack field and this PR's cullLeaves / entityCulling fields now all go in the settings file.

  • Cull Leaves: opt-in graphics setting that culls leaf and mangrove-root faces against each other, adapted from CullLeaves (MIT; credited in THIRD_PARTY_NOTICES.md). Online5277 measured +10–15 FPS with see-through leaves on.
  • Entity culling: conservative and opt-in.

Both are off by default, so vanilla rendering is unchanged unless you turn them on.

Verification on the rebased branch: cargo fmt --check, cargo clippy -p horizon-client --all-targets -D warnings, cargo test -p horizon-client (708 unit tests + integration suites, all pass). Parity: CI on this branch.

Supersedes #387. Thanks @Online5277!

🤖 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/420 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/16/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `contrib/cull-leaves-387` --- ### 📝 Commits (3) - [`504a70c`](https://github.com/horizon-rust/horizon/commit/504a70c062796b9a0bf1411ee4a582d3ad806790) Add an opt-in Cull Leaves graphics setting - [`6aea14c`](https://github.com/horizon-rust/horizon/commit/6aea14c8a0a7dec3777df9125efadc86b38a5a26) Add conservative opt-in entity culling - [`23cadd8`](https://github.com/horizon-rust/horizon/commit/23cadd8b655092b0e30a677d8655248a737c93c4) Keep entity culling description within the UI line limit ### 📊 Changes **26 files changed** (+689 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+2 -0) ➕ `THIRD_PARTY_NOTICES.md` (+31 -0) 📝 `crates/horizon-client/examples/chunk_bench.rs` (+1 -0) 📝 `crates/horizon-client/examples/section_mesh_fixture.rs` (+1 -0) ➕ `crates/horizon-client/src/entity_culling.rs` (+266 -0) 📝 `crates/horizon-client/src/game.rs` (+32 -5) 📝 `crates/horizon-client/src/game/armor_stands.rs` (+2 -0) 📝 `crates/horizon-client/src/game/backdrop.rs` (+1 -0) 📝 `crates/horizon-client/src/game/boats.rs` (+2 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+6 -0) ➕ `crates/horizon-client/src/game/entity_culling.rs` (+51 -0) 📝 `crates/horizon-client/src/game/frames.rs` (+6 -0) 📝 `crates/horizon-client/src/game/item_draw.rs` (+2 -0) 📝 `crates/horizon-client/src/game/lan.rs` (+4 -0) 📝 `crates/horizon-client/src/game/minecarts.rs` (+2 -0) 📝 `crates/horizon-client/src/game/paintings.rs` (+2 -0) 📝 `crates/horizon-client/src/gfx.rs` (+3 -0) 📝 `crates/horizon-client/src/graphics.rs` (+14 -2) 📝 `crates/horizon-client/src/graphics_ui.rs` (+102 -0) 📝 `crates/horizon-client/src/lib.rs` (+1 -0) _...and 6 more files_ </details> ### 📄 Description Online5277's #387, rebased onto main by us because it conflicted with our merges and the fork branch isn't maintainer-editable. All three commits keep their author; the only change is the conflict in `Graphics::serialize`, where main's new `shaderPack` field and this PR's `cullLeaves` / `entityCulling` fields now all go in the settings file. - **Cull Leaves:** opt-in graphics setting that culls leaf and mangrove-root faces against each other, adapted from CullLeaves (MIT; credited in `THIRD_PARTY_NOTICES.md`). Online5277 measured +10–15 FPS with see-through leaves on. - **Entity culling:** conservative and opt-in. Both are off by default, so vanilla rendering is unchanged unless you turn them on. Verification on the rebased branch: `cargo fmt --check`, `cargo clippy -p horizon-client --all-targets -D warnings`, `cargo test -p horizon-client` (708 unit tests + integration suites, all pass). Parity: CI on this branch. Supersedes #387. Thanks @Online5277! 🤖 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-02 15:57:08 +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#2551
No description provided.