[PR #6454] [MERGED] OptiFine emissive textures: armour stands, elytra, the dragon and tridents glow, and blinks keep the glow #6884

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

📋 Pull Request Information

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

Base: main ← Head: optifine/etf-followups


📝 Commits (8)

  • d27c2b4 OptiFine emissive textures: armour stands, elytra and the dragon glow too
  • cba084f OptiFine emissive textures: read the overlays where armour stands draw their armour
  • 69be592 OptiFine emissive and ETF blinking: the gaps the merged PRs' last reviews found
  • dfc2b8b OptiFine emissive textures: a blink frame glows with its own overlay only
  • 514d4b0 OptiFine emissive textures: test a variant blink frame's overlay in the atlas, fix the docs row
  • 742df9f OptiFine emissive textures: thrown tridents glow where the game draws them
  • e4e5f05 OptiFine emissive textures: pass the lookups, not closures around them
  • d456580 OptiFine emissive textures: the lookups are Copy closures, passed by value

📊 Changes

10 files changed (+327 additions, -49 deletions)

View changed files

📝 crates/horizon-client-render/src/hud.rs (+71 -13)
📝 crates/horizon-client/src/game/armor_stands.rs (+37 -0)
📝 crates/horizon-client/src/game/dragon.rs (+13 -0)
📝 crates/horizon-client/src/game/perspective.rs (+40 -11)
📝 crates/horizon-client/src/game/trident.rs (+23 -0)
📝 crates/horizon-client/src/mobs/data.rs (+5 -4)
📝 crates/horizon-client/src/mobs/render.rs (+67 -3)
📝 crates/horizon-optifine/src/blink.rs (+21 -1)
📝 crates/horizon-optifine/src/emissive.rs (+47 -17)
📝 docs/resource-packs.md (+3 -0)

📄 Description

#6217, #6219 and #6220 (emissive and blinking entity textures) merged while their last review rounds were still running. This PR carries those rounds' fixes, which never reached main, and the gaps the reviewers found after.

Glows that were missing:

  • Armour stands, the elytra, the ender dragon: each draws outside render_visible, so their _e overlays never showed. Armour stands now glow on their armour and on their own body. The elytra glows when it shows its own texture, not a cape's. The dragon glows except while it dissolves.
  • The thrown trident, which ETF's guide names ("Tridents support emissive textures"). That covers tridents the server sends and those flying to whoever picks them up (trident_geometry).

Blinking with emissive:

  • A random variant's blink frame now pairs with its own overlay (optifine/random/entity/zombie/zombie3_blink_e.png), and the atlas packs it. Before, only frames under textures/entity/ had one.
  • A blink frame glows with its own overlay only. The texture's overlay is usually the glowing open eyes, and drawing it over the shut frame would hide the blink. A frame without its own _blink_e goes dark while it shows, as before.
  • blinkLength=4294967295 no longer overflows: the length is clamped short of u32::MAX.

Atlas budget:

  • Blink frames now come after every variant in the variant budget, as overlays do.
  • When the budget drops a variant beside its texture, its overlay and blink frames beside it (and theirs) are dropped too. Nothing would draw them.

Locking: the new armour-stand glows read the overlays lock per lookup and let it go, because wings_geometry, which the stand also draws, reads the same lock. Holding it across that call would read it twice on one thread, and a recursive RwLock::read may block when a writer waits.

Docs: docs/resource-packs.md gets rows for random entity textures, emissive textures and blinking. The emissive.rs module doc now says block entities draw the overlays too.

Not covered yet: armour trims (ETF's <pattern>_<material>_e.png), other projectiles, minecarts, end crystals, and the block and item overlays (the block ones are #6457).

Docs I wrote it from (no mod source read): ETF's EMISSIVE_GUIDE.md (tridents, elytra and armour), ETF's README ("Blinking textures"), OptiFine's emissive.properties.

Checks:

  • cargo fmt: clean
  • cargo test -p horizon-optifine blink (the one local test): 4 passed. It includes:
    • a variant's blink frame with its own overlay
    • a frame without one taking no glow
    • a huge blinkLength that still opens the eyes for one tick in u32::MAX
  • A render test (a_blink_shows_its_own_glow_or_none): a silverfish with _e glows open-eyed, shows no glow on its shut frame, and glows with its own _blink_e when it has one.
  • An atlas test: a variant's blink frame overlay is packed.
  • Not tested: the glows drawn by the game binary (armour stands, elytra, dragon, trident). Each needs a whole Game to draw, and none of their draws has a test today.
  • CI on my fork (verify: fmt, clippy -D warnings, cargo test --workspace): run linked in a comment once it finishes.
  • Not run: no live game test (no .local/ vanilla data here).

Note

Filed by Opus 5.5 using 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/6454 **Author:** [@some-du6e](https://github.com/some-du6e) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `optifine/etf-followups` --- ### 📝 Commits (8) - [`d27c2b4`](https://github.com/horizon-rust/horizon/commit/d27c2b4f8b01c634977cefc0c436db89eeab2c17) OptiFine emissive textures: armour stands, elytra and the dragon glow too - [`cba084f`](https://github.com/horizon-rust/horizon/commit/cba084f11064c42bdb4361990104ef59a15f149b) OptiFine emissive textures: read the overlays where armour stands draw their armour - [`69be592`](https://github.com/horizon-rust/horizon/commit/69be592cb22211dc04b355bb8ba7e5b783fdff5c) OptiFine emissive and ETF blinking: the gaps the merged PRs' last reviews found - [`dfc2b8b`](https://github.com/horizon-rust/horizon/commit/dfc2b8b7c05ead8c61edbd529cc45d39b90c9c86) OptiFine emissive textures: a blink frame glows with its own overlay only - [`514d4b0`](https://github.com/horizon-rust/horizon/commit/514d4b012582fee6a3820f5258d6e08f2bdfa0b7) OptiFine emissive textures: test a variant blink frame's overlay in the atlas, fix the docs row - [`742df9f`](https://github.com/horizon-rust/horizon/commit/742df9fb5910a6d644435c7afef17f66655cb69e) OptiFine emissive textures: thrown tridents glow where the game draws them - [`e4e5f05`](https://github.com/horizon-rust/horizon/commit/e4e5f05b40ba0e94e3b2062b4f53ee7d9b8c204e) OptiFine emissive textures: pass the lookups, not closures around them - [`d456580`](https://github.com/horizon-rust/horizon/commit/d4565803b4f6c837c91aaab90f5885e706def592) OptiFine emissive textures: the lookups are Copy closures, passed by value ### 📊 Changes **10 files changed** (+327 additions, -49 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/hud.rs` (+71 -13) 📝 `crates/horizon-client/src/game/armor_stands.rs` (+37 -0) 📝 `crates/horizon-client/src/game/dragon.rs` (+13 -0) 📝 `crates/horizon-client/src/game/perspective.rs` (+40 -11) 📝 `crates/horizon-client/src/game/trident.rs` (+23 -0) 📝 `crates/horizon-client/src/mobs/data.rs` (+5 -4) 📝 `crates/horizon-client/src/mobs/render.rs` (+67 -3) 📝 `crates/horizon-optifine/src/blink.rs` (+21 -1) 📝 `crates/horizon-optifine/src/emissive.rs` (+47 -17) 📝 `docs/resource-packs.md` (+3 -0) </details> ### 📄 Description #6217, #6219 and #6220 (emissive and blinking entity textures) merged while their last review rounds were still running. This PR carries those rounds' fixes, which never reached main, and the gaps the reviewers found after. **Glows that were missing:** - **Armour stands, the elytra, the ender dragon:** each draws outside `render_visible`, so their `_e` overlays never showed. Armour stands now glow on their armour and on their own body. The elytra glows when it shows its own texture, not a cape's. The dragon glows except while it dissolves. - **The thrown trident**, which ETF's guide names ("Tridents support emissive textures"). That covers tridents the server sends and those flying to whoever picks them up (`trident_geometry`). **Blinking with emissive:** - A random variant's blink frame now pairs with its own overlay (`optifine/random/entity/zombie/zombie3_blink_e.png`), and the atlas packs it. Before, only frames under `textures/entity/` had one. - A blink frame glows with its own overlay only. The texture's overlay is usually the glowing open eyes, and drawing it over the shut frame would hide the blink. A frame without its own `_blink_e` goes dark while it shows, as before. - `blinkLength=4294967295` no longer overflows: the length is clamped short of `u32::MAX`. **Atlas budget:** - Blink frames now come after every variant in the variant budget, as overlays do. - When the budget drops a variant beside its texture, its overlay and blink frames beside it (and theirs) are dropped too. Nothing would draw them. **Locking:** the new armour-stand glows read the overlays lock per lookup and let it go, because `wings_geometry`, which the stand also draws, reads the same lock. Holding it across that call would read it twice on one thread, and a recursive `RwLock::read` may block when a writer waits. **Docs:** `docs/resource-packs.md` gets rows for random entity textures, emissive textures and blinking. The `emissive.rs` module doc now says block entities draw the overlays too. Not covered yet: armour trims (ETF's `<pattern>_<material>_e.png`), other projectiles, minecarts, end crystals, and the block and item overlays (the block ones are #6457). **Docs I wrote it from** (no mod source read): ETF's `EMISSIVE_GUIDE.md` (tridents, elytra and armour), ETF's README ("Blinking textures"), OptiFine's `emissive.properties`. **Checks:** - `cargo fmt`: clean - `cargo test -p horizon-optifine blink` (the one local test): 4 passed. It includes: - a variant's blink frame with its own overlay - a frame without one taking no glow - a huge `blinkLength` that still opens the eyes for one tick in `u32::MAX` - A render test (`a_blink_shows_its_own_glow_or_none`): a silverfish with `_e` glows open-eyed, shows no glow on its shut frame, and glows with its own `_blink_e` when it has one. - An atlas test: a variant's blink frame overlay is packed. - Not tested: the glows drawn by the game binary (armour stands, elytra, dragon, trident). Each needs a whole `Game` to draw, and none of their draws has a test today. - CI on my fork (`verify`: fmt, clippy `-D warnings`, `cargo test --workspace`): run linked in a comment once it finishes. - Not run: no live game test (no `.local/` vanilla data here). > [!NOTE] > Filed by Opus 5.5 using 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 06:28:36 +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#6884
No description provided.