[PR #7497] [MERGED] Pose horse markings and slime outer cubes on the GPU #7628

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7497
Author: @ludovic111
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: perf/horse-markings-gpu


📝 Commits (1)

  • d821e95 Pose horse markings and slime outer cubes on the GPU

📊 Changes

6 files changed (+48 additions, -18 deletions)

View changed files

📝 crates/horizon-client-render/src/gfx.rs (+4 -3)
📝 crates/horizon-client/src/game/creatures.rs (+1 -1)
📝 crates/horizon-client/src/mobs/render.rs (+7 -5)
📝 crates/horizon-client/src/mobs/skin.rs (+17 -9)
📝 tests/test_perf_bench.py (+1 -0)
📝 tools/stress_scenes.py (+18 -0)

📄 Description

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

Was stacked on #7496 (merged); now based on main.

Horse markings (HorseMarkingLayer) and the slime's outer cube were the village and swamp mobs still posed on the CPU: they are translucent layers that are not full bright, and only the eyes layers were let onto the GPU path in #7287. With improved transparency off, the GPU entity batch draws a tagged layer in order with material 0, which is exactly what the CPU path does, so these layers can be posed on the GPU too.

  • SkinModels.eyes becomes tagged (the renderer can draw tagged translucent layers in order); skins_eyes() → skins_tagged().
  • A layer is GPU-posable when it is an eyes layer or not full bright, with tagged on; translucent bodies (piglins, vex, allay, breeze, sulfur cube, player skins with translucency) stay on the CPU.
  • The every-mob GPU/CPU byte test gives the horse a marking (whitefield) and now expects horse and slime on the GPU path: their GPU-posed vertices are byte-identical to the CPU ones.
  • New stress_markings scene in tools/stress_scenes.py: 1000 horses with all markings and slimes.

Measured (Mac mini M4 Pro, perf_bench, stress_markings, RD 16, 720p offscreen, 3 alternating A/B pairs)

#7496 (base) this PR
avg fps 230.8 / 231.7 / 238.8 (233.8) 579.9 / 567.6 / 590.9 (579.5, ×2.48)
1 % low fps 168.3 / 181.6 / 183.5 395.1 / 375.4 / 400.3
frame CPU p50 4.22 / 4.24 / 4.12 ms 1.68 / 1.71 / 1.66 ms (−60 %)
frame CPU p99 5.52 / 5.33 / 5.23 ms 2.39 / 2.50 / 2.31 ms

The third run of this branch ran a few minutes after the others, once the Mac's disk was back over its 25 GB floor. Vanilla 26.3 on the same scene: 57.9 fps, 1 % low 26.0, frame p50 16.7 ms; this PR is ×10.0 vanilla there.

pr_ready (tools/pr_ready.py --quick on playhorizon, against origin/main at 8dd76f8d4, 49 min 31 s)

Check Result
Scope ⚠️ 14 files, +413 −167; 579 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 614 passed (1 min 8 s)
rustfmt ✅ (14 s)
clippy ✅ (3 min 53 s)
tests: horizon-client, horizon-client-lib, horizon-client-render ❌ 2177 passed (42 min 51 s)
doc tests ✅ 0 passed (9 s)
content root tests ➖ content root untouched
mod API up to date ✅ (38 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 140 affected, to run in CI (--quick): ambient_sound, anvil_turtle_egg, armor_stand_frost, armor_stand_turtle_egg, arrow, arrow_wind_charge, audio_attributes, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles and 128 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The ❌ on tests is the horizon-client-render lib test binary dying with SIGSEGV when its tests run in parallel on playhorizon's software GPU (llvmpipe). Rerun with --test-threads=1 on this branch merged with main (a776386c2): 1171 passed, 0 failed, 38 ignored; main alone (68ff46998) gives the same 1171. horizon-client and horizon-client-lib tests passed in this run.

🤖 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/7497 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/horse-markings-gpu` --- ### 📝 Commits (1) - [`d821e95`](https://github.com/horizon-rust/horizon/commit/d821e95b87938d2ede3cbf4bcbb7898dead295e0) Pose horse markings and slime outer cubes on the GPU ### 📊 Changes **6 files changed** (+48 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/gfx.rs` (+4 -3) 📝 `crates/horizon-client/src/game/creatures.rs` (+1 -1) 📝 `crates/horizon-client/src/mobs/render.rs` (+7 -5) 📝 `crates/horizon-client/src/mobs/skin.rs` (+17 -9) 📝 `tests/test_perf_bench.py` (+1 -0) 📝 `tools/stress_scenes.py` (+18 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Was stacked on #7496 (merged); now based on main. Horse markings (`HorseMarkingLayer`) and the slime's outer cube were the village and swamp mobs still posed on the CPU: they are translucent layers that are not full bright, and only the eyes layers were let onto the GPU path in #7287. With improved transparency off, the GPU entity batch draws a tagged layer in order with material 0, which is exactly what the CPU path does, so these layers can be posed on the GPU too. - `SkinModels.eyes` becomes `tagged` (the renderer can draw tagged translucent layers in order); `skins_eyes()` → `skins_tagged()`. - A layer is GPU-posable when it is an eyes layer or not full bright, with `tagged` on; translucent bodies (piglins, vex, allay, breeze, sulfur cube, player skins with translucency) stay on the CPU. - The every-mob GPU/CPU byte test gives the horse a marking (whitefield) and now expects horse and slime on the GPU path: their GPU-posed vertices are byte-identical to the CPU ones. - New `stress_markings` scene in `tools/stress_scenes.py`: 1000 horses with all markings and slimes. **Measured** (Mac mini M4 Pro, `perf_bench`, stress_markings, RD 16, 720p offscreen, 3 alternating A/B pairs) | | #7496 (base) | this PR | |---|---|---| | avg fps | 230.8 / 231.7 / 238.8 (233.8) | 579.9 / 567.6 / 590.9 (579.5, **×2.48**) | | 1 % low fps | 168.3 / 181.6 / 183.5 | 395.1 / 375.4 / 400.3 | | frame CPU p50 | 4.22 / 4.24 / 4.12 ms | 1.68 / 1.71 / 1.66 ms (−60 %) | | frame CPU p99 | 5.52 / 5.33 / 5.23 ms | 2.39 / 2.50 / 2.31 ms | The third run of this branch ran a few minutes after the others, once the Mac's disk was back over its 25 GB floor. Vanilla 26.3 on the same scene: 57.9 fps, 1 % low 26.0, frame p50 16.7 ms; this PR is **×10.0 vanilla** there. **pr_ready** (`tools/pr_ready.py --quick` on playhorizon, against origin/main at 8dd76f8d4, 49 min 31 s) | Check | Result | | --- | --- | | Scope | ⚠️ 14 files, +413 −167; 579 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 614 passed (1 min 8 s) | | rustfmt | ✅ (14 s) | | clippy | ✅ (3 min 53 s) | | tests: horizon-client, horizon-client-lib, horizon-client-render | ❌ 2177 passed (42 min 51 s) | | doc tests | ✅ 0 passed (9 s) | | content root tests | ➖ content root untouched | | mod API up to date | ✅ (38 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 140 affected, to run in CI (--quick): ambient_sound, anvil_turtle_egg, armor_stand_frost, armor_stand_turtle_egg, arrow, arrow_wind_charge, audio_attributes, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles and 128 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The ❌ on tests is the `horizon-client-render` lib test binary dying with SIGSEGV when its tests run in parallel on playhorizon's software GPU (llvmpipe). Rerun with `--test-threads=1` on this branch merged with main (a776386c2): 1171 passed, 0 failed, 38 ignored; main alone (68ff46998) gives the same 1171. horizon-client and horizon-client-lib tests passed in this run. 🤖 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 07:21:05 +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#7628
No description provided.