[PR #7801] Bridge standard shader packs to GPU entity posing #7833

Open
opened 2026-11-03 07:25:05 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7801
Author: @gigamans442
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: feat/standard-pack-gpu-entities-20261102


📝 Commits (4)

  • 9909af9 Bridge standard shader packs to GPU entity posing
  • 50e285c Merge current public main and preserve tagged layer fallback
  • eae70a8 Specify byte type in the skin output regression
  • 993663b Use fixed-size pixel chunks in the GPU fixture

📊 Changes

8 files changed (+990 additions, -68 deletions)

View changed files

➕ crates/horizon-client-render/examples/standard_pack_gpu_entities.rs (+397 -0)
📝 crates/horizon-client-render/src/gfx.rs (+52 -19)
📝 crates/horizon-client-render/src/gfx/entity_skin.rs (+140 -19)
📝 crates/horizon-client-render/src/gfx/pack_entities.rs (+338 -25)
📝 crates/horizon-client-render/src/gfx/pack_post.rs (+14 -0)
📝 crates/horizon-client/src/game/creatures.rs (+22 -1)
📝 crates/horizon-client/src/game/entity_culling.rs (+6 -4)
📝 crates/horizon-client/src/game/shader_packs.rs (+21 -0)

📄 Description

🤖 Opened by gigamans442's AI agent (Codex, GPT-6.1-sol), not by gigamans442 personally.

What and why

Fixes #7748.

Standard shaders/ packs currently turn off the existing GPU model path. This bridges ordinary supported mob/item jobs into the pack entity buffer, carrying shader IDs, hurt/white-flash overlays and camera-hidden shadow casters. CPU geometry follows the GPU output without overlapping it; glowing silhouettes keep their existing separate destination.

The culling bridge uses each current query's boolean. Consecutive GPU-only subjects can share a CPU offset, so historical zero-length CPU markers must not decide a successor's visibility. Existing sync/async proof validation, budget/no-proof fail-open behavior and CPU/special-model/player/eye fallbacks remain. Standard packs also retain the CPU path when a native observer needs that CPU entity stream. Material maps, translator changes, caches and geometry-stage extensions are outside this PR. No FPS gain is claimed.

Current upstream integration: this branch normally merges public main 3fc4c4ca050109ab912ac786209303c62265b605, including merged #7496 and #7497. It retains Skin::new/versioned poses and the tagged layer contract; those layers stay on the CPU for standard packs. The only merge conflict was the renamed capability method, resolved with that name and the standard-pack fallback guard. No unmerged implementation is included. The separate #7378 owns the shared back-face decoder. An isolated normal merge with its exact head a870067 passes the CPU/GPU high-bit face/body/outline comparison and actual client typecheck; that implementation is not included here.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • 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

Horizon renderer submission optimization. Model expansion and existing CPU/GPU byte parity remain the reference; no entity ticking, gameplay rules or model geometry is changed. New original regressions cover IDs/overlays, mixed CPU/GPU offsets, hidden caster flags, target growth and distinct body/outline outputs. An asset-free offscreen example compares CPU/GPU diagnostic pixels and fallback/observer behavior.

Other projects' code

Extracted from earlier private Skyline bridge/visibility work onto public Horizon history. Earlier private shader-pack research exists; this is not a pristine clean-room claim for that private branch. The transferred changes are Horizon MIT renderer/gameplay changes and original synthetic fixtures. No third-party shader implementation, pack assets, game resources, worlds or player media are included. The new shader snippets are original diagnostics. No external project code is added.

Self-check

Verified at 993663b918da4c809879b63c67b1d9fa6ba79d20.

  • Current-head CI passes: public-tree/history-range checks; Python 614 tests (1 skipped); formatting; workspace/all-targets and server Clippy; workspace tests and docs. Selected results: gameplay 706 passed / 5 ignored; renderer 1173 passed / 38 ignored; integration 3+2 passed; xtask 20 passed, including generated mod API output. CI tested its merge of this head into f1d6576b with Rust 1.99.1.
  • The exact latest original example passes on Intel Arc A770 / Vulkan / Mesa 26.2.4: CPU/GPU image bytes match, 864 exact ID/hurt pixels, 864 exact white-flash pixels, zero hidden-subject pixels, and preserved native-observer/failed-pack/off/tagged fallbacks. System Rust 1.99.0 freshly compiled the latest example against a captured immutable eae70a8ab library graph under the shared build lease. All production source, Cargo configuration, features and flags are verified unchanged; only three equivalent example iterator spellings differ. This is qualified library equivalence, not a claim of rebuilding every local dependency at the latest head.
  • Six focused renderer tests pass at eae70a8ab with byte-identical production/test source at this head. The separate exact-head #7378 composition passes its GPU high-bit/body/outline test plus actual client typecheck, with stable staged source hashes; no unmerged source is imported.
  • Exact public-main bc761767 reaches the expected unsupported-GPU gate after its CPU diagnostic output. Public CPU and all frozen/refreshed/latest CPU/GPU image bytes match. Separately, the production-method culling comparison records earlier private bridge 12 pass / 12 expected visibility failures, then correction 24/24, with identical pinned types/libraries and controlled proof inputs. All 27 audited culling/type/helper components match the refreshed implementation. Pristine public main lacked this bridge; this comparison is not a claim that the bridge visibility bug existed there.
  • Local formatting, whitespace and normal public-tree hooks/history checks pass. Preserved earlier failures were one added-test byte-type inference error and three example iterator Clippy diagnostics, corrected without changing assertions or production behavior. Current CI and source-qualified runtime retries pass.
  • No local tools/pr_ready.py execution or generated block is claimed. Actual CI commands cover its selected client/renderer tests/docs, workspace/server lint, Python/public-tree and generated API checks. Launcher tests were scope-skipped. Fork vanilla-parity jobs remain skipped; local parity is listed without prepared data. These fixtures do not establish live async timing, gameplay, multiplayer, non-Vulkan visuals or measured FPS.

Screenshots

The original asset-free example emits cpu.png and gpu.png; the 320×180 diagnostic pixel bytes match across the public CPU baseline, frozen extraction, refreshed build and latest fixture. No player screenshots or private assets are included.

Allow edits by maintainers is enabled. After maintainer changes, upstream updates will be merged without rebasing away their commits.

🤖 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/7801 **Author:** [@gigamans442](https://github.com/gigamans442) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/standard-pack-gpu-entities-20261102` --- ### 📝 Commits (4) - [`9909af9`](https://github.com/horizon-rust/horizon/commit/9909af9cedb66a5bdb376e05097733f24a32f8c5) Bridge standard shader packs to GPU entity posing - [`50e285c`](https://github.com/horizon-rust/horizon/commit/50e285cd9a936f8f57e0cdcf963eac159b6c34de) Merge current public main and preserve tagged layer fallback - [`eae70a8`](https://github.com/horizon-rust/horizon/commit/eae70a8ab6eb2c8b1e36d44424060f252be4ac52) Specify byte type in the skin output regression - [`993663b`](https://github.com/horizon-rust/horizon/commit/993663b918da4c809879b63c67b1d9fa6ba79d20) Use fixed-size pixel chunks in the GPU fixture ### 📊 Changes **8 files changed** (+990 additions, -68 deletions) <details> <summary>View changed files</summary> ➕ `crates/horizon-client-render/examples/standard_pack_gpu_entities.rs` (+397 -0) 📝 `crates/horizon-client-render/src/gfx.rs` (+52 -19) 📝 `crates/horizon-client-render/src/gfx/entity_skin.rs` (+140 -19) 📝 `crates/horizon-client-render/src/gfx/pack_entities.rs` (+338 -25) 📝 `crates/horizon-client-render/src/gfx/pack_post.rs` (+14 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+22 -1) 📝 `crates/horizon-client/src/game/entity_culling.rs` (+6 -4) 📝 `crates/horizon-client/src/game/shader_packs.rs` (+21 -0) </details> ### 📄 Description > 🤖 Opened by gigamans442's AI agent (Codex, GPT-6.1-sol), not by gigamans442 personally. ## What and why Fixes #7748. Standard `shaders/` packs currently turn off the existing GPU model path. This bridges ordinary supported mob/item jobs into the pack entity buffer, carrying shader IDs, hurt/white-flash overlays and camera-hidden shadow casters. CPU geometry follows the GPU output without overlapping it; glowing silhouettes keep their existing separate destination. The culling bridge uses each current query's boolean. Consecutive GPU-only subjects can share a CPU offset, so historical zero-length CPU markers must not decide a successor's visibility. Existing sync/async proof validation, budget/no-proof fail-open behavior and CPU/special-model/player/eye fallbacks remain. Standard packs also retain the CPU path when a native observer needs that CPU entity stream. Material maps, translator changes, caches and geometry-stage extensions are outside this PR. No FPS gain is claimed. **Current upstream integration:** this branch normally merges public main `3fc4c4ca050109ab912ac786209303c62265b605`, including merged #7496 and #7497. It retains `Skin::new`/versioned poses and the `tagged` layer contract; those layers stay on the CPU for standard packs. The only merge conflict was the renamed capability method, resolved with that name and the standard-pack fallback guard. No unmerged implementation is included. The separate #7378 owns the shared back-face decoder. An isolated normal merge with its exact head `a870067` passes the CPU/GPU high-bit face/body/outline comparison and actual client typecheck; that implementation is not included here. ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [x] perf: faster, or less memory - [ ] feature: something new for players - [ ] extra: Horizon-only, off by default - [ ] tooling - [ ] docs ## Vanilla reference Horizon renderer submission optimization. Model expansion and existing CPU/GPU byte parity remain the reference; no entity ticking, gameplay rules or model geometry is changed. New original regressions cover IDs/overlays, mixed CPU/GPU offsets, hidden caster flags, target growth and distinct body/outline outputs. An asset-free offscreen example compares CPU/GPU diagnostic pixels and fallback/observer behavior. ## Other projects' code Extracted from earlier private Skyline bridge/visibility work onto public Horizon history. Earlier private shader-pack research exists; this is not a pristine clean-room claim for that private branch. The transferred changes are Horizon MIT renderer/gameplay changes and original synthetic fixtures. No third-party shader implementation, pack assets, game resources, worlds or player media are included. The new shader snippets are original diagnostics. No external project code is added. ## Self-check **Verified at `993663b918da4c809879b63c67b1d9fa6ba79d20`.** - [Current-head CI](https://github.com/horizon-rust/horizon/actions/runs/41528237968) passes: public-tree/history-range checks; Python 614 tests (1 skipped); formatting; workspace/all-targets and server Clippy; workspace tests and docs. Selected results: gameplay 706 passed / 5 ignored; renderer 1173 passed / 38 ignored; integration 3+2 passed; xtask 20 passed, including generated mod API output. CI tested its merge of this head into `f1d6576b` with Rust 1.99.1. - The exact latest original example passes on Intel Arc A770 / Vulkan / Mesa 26.2.4: CPU/GPU image bytes match, 864 exact ID/hurt pixels, 864 exact white-flash pixels, zero hidden-subject pixels, and preserved native-observer/failed-pack/off/tagged fallbacks. System Rust 1.99.0 freshly compiled the latest example against a captured immutable `eae70a8ab` library graph under the shared build lease. All production source, Cargo configuration, features and flags are verified unchanged; only three equivalent example iterator spellings differ. This is qualified library equivalence, not a claim of rebuilding every local dependency at the latest head. - Six focused renderer tests pass at `eae70a8ab` with byte-identical production/test source at this head. The separate exact-head #7378 composition passes its GPU high-bit/body/outline test plus actual client typecheck, with stable staged source hashes; no unmerged source is imported. - Exact public-main `bc761767` reaches the expected unsupported-GPU gate after its CPU diagnostic output. Public CPU and all frozen/refreshed/latest CPU/GPU image bytes match. Separately, the production-method culling comparison records earlier private bridge 12 pass / 12 expected visibility failures, then correction 24/24, with identical pinned types/libraries and controlled proof inputs. All 27 audited culling/type/helper components match the refreshed implementation. Pristine public main lacked this bridge; this comparison is not a claim that the bridge visibility bug existed there. - Local formatting, whitespace and normal public-tree hooks/history checks pass. Preserved earlier failures were one added-test byte-type inference error and three example iterator Clippy diagnostics, corrected without changing assertions or production behavior. Current CI and source-qualified runtime retries pass. - No local `tools/pr_ready.py` execution or generated block is claimed. Actual CI commands cover its selected client/renderer tests/docs, workspace/server lint, Python/public-tree and generated API checks. Launcher tests were scope-skipped. Fork vanilla-parity jobs remain skipped; local parity is listed without prepared data. These fixtures do not establish live async timing, gameplay, multiplayer, non-Vulkan visuals or measured FPS. ## Screenshots The original asset-free example emits `cpu.png` and `gpu.png`; the 320×180 diagnostic pixel bytes match across the public CPU baseline, frozen extraction, refreshed build and latest fixture. No player screenshots or private assets are included. Allow edits by maintainers is enabled. After maintainer changes, upstream updates will be merged without rebasing away their commits. 🤖 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#7833
No description provided.