[PR #6615] [MERGED] OptiFine packs: connected-texture tiles glow with their emissive overlays #6983

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

📋 Pull Request Information

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

Base: main ← Head: optifine/ctm-emissive


📝 Commits (10+)

  • 6fdeef1 OptiFine CTM: a picked tile can be matched by another rule
  • 048f3b6 OptiFine CTM chained tiles: no rerun of rules already tried
  • 88f4b82 OptiFine CTM chained tiles: rules after the pick still chain
  • 69c1111 Merge main into #6578
  • b418ea1 OptiFine CTM: Continuity's orient=texture
  • 8086d13 Merge remote-tracking branch 'origin/main' into optifine/ctm-chained
  • 5c2a3cc Merge branch 'optifine/ctm-chained' of https://github.com/some-du6e/horizon into optifine/ctm-chained
  • 8057c41 OptiFine CTM orient=texture: review fixes, merged with the chained-tile branch
  • 9563b41 OptiFine CTM orient=texture: no directions on planes off the block's axes
  • 3237499 Resource packs doc: connected textures, and why name= rules aren't loaded

📊 Changes

5 files changed (+349 additions, -22 deletions)

View changed files

📝 crates/horizon-client-render/src/connected.rs (+193 -9)
📝 crates/horizon-client-render/src/mesher.rs (+9 -1)
📝 crates/horizon-client-render/src/native_emissive.rs (+64 -11)
📝 crates/horizon-optifine/src/ctm/connect.rs (+81 -0)
📝 docs/resource-packs.md (+2 -1)

📄 Description

OptiFine and Continuity packs give connected-texture tiles emissive overlays, the same way as plain block textures: 0.png with 0_e.png (or the pack's suffix.emissive) beside it glows. Horizon draws emissive overlays for block sprites, but connected-texture tiles never got theirs. So a glowing block lost its glow as soon as a CTM rule replaced its sprite: lamps, ores and emissive glass in packs like those.

Depends on #6609 (and through it #6593 and #6578; their commits are at the bottom of this branch). Review only the last two commits.

native_emissive::load_optifine (crates/horizon-client-render/src/native_emissive.rs) already runs after the tiles are loaded. Its pairing now also takes connected-texture tiles named by their file (assets/<ns>/..., any tile outside textures/; tiles inside textures/block/ already paired as block sprites). Block overlays come first and tiles take what is left of the shared table, so a pack's many tiles can't crowd out vanilla blocks' overlays. The overlay is the file beside the tile with the suffix added, loaded with Sprites::insert_file; one that doesn't load is skipped, not drawn as the missing texture. The terrain shader pairs overlays by sprite layer, so a face drawing that tile glows with no mesher change. The existing limits apply: the shared table of overlays, none for tiles whose pixels another sprite shares, cutout.

docs/resource-packs.md: the emissive and connected-texture rows now say tiles glow.

Docs used: OptiFine's OptiFineDoc/doc/emissive.properties (suffix.emissive) and Continuity's README (emissive textures for blocks). No mod source was read.

Checks: cargo fmt; cargo test -p horizon-client-render --lib native_emissive (3 tests; optifine_overlays_pair_with_their_loaded_blocks now also checks tiles with and without an overlay, one outside ctm/, the pack's own suffix, and that blocks come before tiles). Fork CI runs on each push: https://github.com/some-du6e/horizon/actions?query=branch%3Aoptifine%2Fctm-emissive. There's no live game test: this machine has no vanilla data (.local/).

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/6615 **Author:** [@some-du6e](https://github.com/some-du6e) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `optifine/ctm-emissive` --- ### 📝 Commits (10+) - [`6fdeef1`](https://github.com/horizon-rust/horizon/commit/6fdeef19a7be635e148aea2f8dd27a98976df3ef) OptiFine CTM: a picked tile can be matched by another rule - [`048f3b6`](https://github.com/horizon-rust/horizon/commit/048f3b6e87d25fef4132691a19102c166dca86c6) OptiFine CTM chained tiles: no rerun of rules already tried - [`88f4b82`](https://github.com/horizon-rust/horizon/commit/88f4b82bfe932acb97ad74c71c4c00cb98757757) OptiFine CTM chained tiles: rules after the pick still chain - [`69c1111`](https://github.com/horizon-rust/horizon/commit/69c11117a62344809e3e207f7993b882a7adda9a) Merge main into #6578 - [`b418ea1`](https://github.com/horizon-rust/horizon/commit/b418ea15f00290bc7f8ab35e49b8ed27898263f0) OptiFine CTM: Continuity's orient=texture - [`8086d13`](https://github.com/horizon-rust/horizon/commit/8086d137e5519aa1935f680d9c8fbbf86b529a73) Merge remote-tracking branch 'origin/main' into optifine/ctm-chained - [`5c2a3cc`](https://github.com/horizon-rust/horizon/commit/5c2a3cc945f958c38369fb852dd8a67247b06f30) Merge branch 'optifine/ctm-chained' of https://github.com/some-du6e/horizon into optifine/ctm-chained - [`8057c41`](https://github.com/horizon-rust/horizon/commit/8057c41c069c7b13503fb44155f62f62c421ba59) OptiFine CTM orient=texture: review fixes, merged with the chained-tile branch - [`9563b41`](https://github.com/horizon-rust/horizon/commit/9563b41599fb3b1af8a7fff80a8a53acd0512dd0) OptiFine CTM orient=texture: no directions on planes off the block's axes - [`3237499`](https://github.com/horizon-rust/horizon/commit/3237499eab80a4da79458d8054e57382d0a6aef3) Resource packs doc: connected textures, and why name= rules aren't loaded ### 📊 Changes **5 files changed** (+349 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/connected.rs` (+193 -9) 📝 `crates/horizon-client-render/src/mesher.rs` (+9 -1) 📝 `crates/horizon-client-render/src/native_emissive.rs` (+64 -11) 📝 `crates/horizon-optifine/src/ctm/connect.rs` (+81 -0) 📝 `docs/resource-packs.md` (+2 -1) </details> ### 📄 Description OptiFine and Continuity packs give connected-texture tiles emissive overlays, the same way as plain block textures: `0.png` with `0_e.png` (or the pack's `suffix.emissive`) beside it glows. Horizon draws emissive overlays for block sprites, but connected-texture tiles never got theirs. So a glowing block lost its glow as soon as a CTM rule replaced its sprite: lamps, ores and emissive glass in packs like those. **Depends on #6609** (and through it #6593 and #6578; their commits are at the bottom of this branch). Review only the last two commits. `native_emissive::load_optifine` (`crates/horizon-client-render/src/native_emissive.rs`) already runs after the tiles are loaded. Its pairing now also takes connected-texture tiles named by their file (`assets/<ns>/...`, any tile outside `textures/`; tiles inside `textures/block/` already paired as block sprites). Block overlays come first and tiles take what is left of the shared table, so a pack's many tiles can't crowd out vanilla blocks' overlays. The overlay is the file beside the tile with the suffix added, loaded with `Sprites::insert_file`; one that doesn't load is skipped, not drawn as the missing texture. The terrain shader pairs overlays by sprite layer, so a face drawing that tile glows with no mesher change. The existing limits apply: the shared table of overlays, none for tiles whose pixels another sprite shares, cutout. `docs/resource-packs.md`: the emissive and connected-texture rows now say tiles glow. **Docs used:** OptiFine's `OptiFineDoc/doc/emissive.properties` (`suffix.emissive`) and Continuity's README (emissive textures for blocks). No mod source was read. **Checks:** `cargo fmt`; `cargo test -p horizon-client-render --lib native_emissive` (3 tests; `optifine_overlays_pair_with_their_loaded_blocks` now also checks tiles with and without an overlay, one outside `ctm/`, the pack's own suffix, and that blocks come before tiles). Fork CI runs on each push: https://github.com/some-du6e/horizon/actions?query=branch%3Aoptifine%2Fctm-emissive. There's no live game test: this machine has no vanilla data (`.local/`). > [!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:30: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#6983
No description provided.