[PR #6322] [MERGED] ender dragon: the dying model dissolves through dragon_exploding's mask instead of fading #6792

Closed
opened 2026-11-03 06:26:46 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: dragon-death-dissolve


📝 Commits (1)

  • 7458a6c ender dragon: the dying model dissolves through dragon_exploding's mask instead of fading

📊 Changes

4 files changed (+63 additions, -9 deletions)

View changed files

📝 crates/horizon-client-render/src/entity.wgsl (+11 -2)
📝 crates/horizon-client-render/src/gfx.rs (+1 -1)
📝 crates/horizon-client-render/src/gfx/entity_batch.rs (+4 -0)
📝 crates/horizon-client/src/game/dragon.rs (+47 -6)

📄 Description

What and why

The dying Ender Dragon only faded out, so its model never broke apart the way vanilla's does while it rises. It is now drawn with vanilla's dissolve: a pixel is dropped once the model's alpha (1 − deathTime/200) falls below dragon_exploding.png's alpha at the same UV, and what's left stays opaque. It reuses the entity pipeline through a new overlay code (38), with the mask sprite's UV in the vertex's spare glint_uv; without the mask sprite the model is drawn whole.

Not seen in game: /kill removes a dragon at once (vanilla's EnderDragon.kill too) and a scripted dragon couldn't be brought down otherwise; the shader validates in the naga test and the mask mapping and ARGB.white wrap have a unit test.

Fixes #6001.

Vanilla reference

EnderDragonRenderer.submit draws the dying model with RenderTypes.entityCutoutDissolve(dragon.png, dragon_exploding.png) at ARGB.white(1 - deathTime / 200) and NO_OVERLAY; entity.fsh under DISSOLVE discards where the vertex alpha is below DissolveMaskSampler's, then sets alpha to 1.

Self-check

pr_ready (tools/pr_ready.py --quick on PC-Lost, against origin/main at 1bd24e404, 4 min 44 s)

Check Result
Scope ✅ 4 files, +63 −9
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 586 run, FAILED (errors=1, skipped=2) (1 min 52 s)
rustfmt ✅ (15 s)
clippy ✅ (50 s)
tests: horizon-client, horizon-client-render ❌ 1750 passed, 1 failed (1 min 39 s)
doc tests ✅ 0 passed (4 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 (release-now if urgent)

Rebased on e5a4324ca afterwards: clippy and the touched crates' fog, dragon and render tests rerun green. The two failures are Windows-only and outside this branch: native_hooks::tests::native_loot_kinds_stay_hookable looks for "\n}\n" in a CRLF checkout, and test_world_input_capture exits 101 here. Parity is left to CI.


🔄 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/6322 **Author:** [@iLostName](https://github.com/iLostName) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `dragon-death-dissolve` --- ### 📝 Commits (1) - [`7458a6c`](https://github.com/horizon-rust/horizon/commit/7458a6ca1ae49ab9e3bd8649c8bd519a89528274) ender dragon: the dying model dissolves through dragon_exploding's mask instead of fading ### 📊 Changes **4 files changed** (+63 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/entity.wgsl` (+11 -2) 📝 `crates/horizon-client-render/src/gfx.rs` (+1 -1) 📝 `crates/horizon-client-render/src/gfx/entity_batch.rs` (+4 -0) 📝 `crates/horizon-client/src/game/dragon.rs` (+47 -6) </details> ### 📄 Description ## What and why The dying Ender Dragon only faded out, so its model never broke apart the way vanilla's does while it rises. It is now drawn with vanilla's dissolve: a pixel is dropped once the model's alpha (1 − deathTime/200) falls below `dragon_exploding.png`'s alpha at the same UV, and what's left stays opaque. It reuses the entity pipeline through a new overlay code (38), with the mask sprite's UV in the vertex's spare `glint_uv`; without the mask sprite the model is drawn whole. Not seen in game: `/kill` removes a dragon at once (vanilla's `EnderDragon.kill` too) and a scripted dragon couldn't be brought down otherwise; the shader validates in the naga test and the mask mapping and `ARGB.white` wrap have a unit test. Fixes #6001. ## Vanilla reference `EnderDragonRenderer.submit` draws the dying model with `RenderTypes.entityCutoutDissolve(dragon.png, dragon_exploding.png)` at `ARGB.white(1 - deathTime / 200)` and `NO_OVERLAY`; `entity.fsh` under `DISSOLVE` discards where the vertex alpha is below `DissolveMaskSampler`'s, then sets alpha to 1. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on PC-Lost, against origin/main at 1bd24e404, 4 min 44 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +63 −9 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 586 run, FAILED (errors=1, skipped=2) (1 min 52 s) | | rustfmt | ✅ (15 s) | | clippy | ✅ (50 s) | | tests: horizon-client, horizon-client-render | ❌ 1750 passed, 1 failed (1 min 39 s) | | doc tests | ✅ 0 passed (4 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 (`release-now` if urgent) | Rebased on e5a4324ca afterwards: clippy and the touched crates' fog, dragon and render tests rerun green. The two failures are Windows-only and outside this branch: `native_hooks::tests::native_loot_kinds_stay_hookable` looks for `"\n}\n"` in a CRLF checkout, and `test_world_input_capture` exits 101 here. Parity is left to CI. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:26:46 +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#6792
No description provided.