[PR #6593] [MERGED] OptiFine packs: Continuity's orient=texture connects along the face's own texture #6971

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

📋 Pull Request Information

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

Base: main ← Head: optifine/ctm-orient-texture


📝 Commits (9)

  • 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

📊 Changes

3 files changed (+283 additions, -10 deletions)

View changed files

📝 crates/horizon-client-render/src/connected.rs (+193 -9)
📝 crates/horizon-client-render/src/mesher.rs (+9 -1)
📝 crates/horizon-optifine/src/ctm/connect.rs (+81 -0)

📄 Description

Continuity packs can set orient=texture on a connected-texture rule. Left, right, up and down on a face then follow the face's own texture, not a plain cube's, so blocks whose models turn or mirror their textures (logs on their side, panes, rotated blocks) connect the way the texture runs. Horizon read the property but treated it like the cube's directions, so those rules connected the wrong neighbours.

Depends on #6578 (its commits are at the bottom of this branch). Review only the last commit.

  • Axes::texture (crates/horizon-optifine/src/ctm/connect.rs, the shared geometry module) works out where a quad's texture points from its corners' positions and UVs: the direction the U and V coordinates grow along the quad, snapped to the block's axes. It returns None for a quad whose UVs don't span it or whose texture runs off the block's axes (a plant's 45° planes, diagonal UVs); the cube's directions are used then.
  • Panes, whose tiles are drawn with the cube's UVs (#6450), report the cube's directions as their texture. Plain method=overlay keeps the standard directions, since Continuity's orient doesn't list it; the other overlay methods follow it.
  • ConnectedTextures::pick takes the quad's texture directions lazily. Only rules with orient=texture ask for them, so other faces pay nothing. The mesher passes them from the quad's positions and UVs.
  • OptiFine's own defaults are unchanged: the cube's directions for ctm/ctm_compact, the block's axis for the horizontal/vertical methods. Continuity's wiki lists those as OptiFine's behaviour.

Docs used: Continuity's wiki page "Continuity Connected Textures Specification" (the orient property). No mod source was read.

Checks: cargo fmt. New tests:

  • connect::tests::a_quads_own_texture_directions: cube, mirrored and quarter-turned faces, plus UVs that don't span the quad, diagonal UVs, NaN and a 45° plant plane.
  • connected::tests::orient_texture_follows_the_quads_uvs: a mirrored pane face connects to the other side than with orient=none, and a plain overlay ignores orient=texture.

cargo test -p horizon-optifine --lib a_quads_own and cargo test -p horizon-client-render --lib connected:: (17 tests) pass. Fork CI runs on each push: https://github.com/some-du6e/horizon/actions?query=branch%3Aoptifine%2Fctm-orient-texture. 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/6593 **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-orient-texture` --- ### 📝 Commits (9) - [`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 ### 📊 Changes **3 files changed** (+283 additions, -10 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-optifine/src/ctm/connect.rs` (+81 -0) </details> ### 📄 Description Continuity packs can set `orient=texture` on a connected-texture rule. Left, right, up and down on a face then follow the face's own texture, not a plain cube's, so blocks whose models turn or mirror their textures (logs on their side, panes, rotated blocks) connect the way the texture runs. Horizon read the property but treated it like the cube's directions, so those rules connected the wrong neighbours. **Depends on #6578** (its commits are at the bottom of this branch). Review only the last commit. - `Axes::texture` (`crates/horizon-optifine/src/ctm/connect.rs`, the shared geometry module) works out where a quad's texture points from its corners' positions and UVs: the direction the U and V coordinates grow along the quad, snapped to the block's axes. It returns `None` for a quad whose UVs don't span it or whose texture runs off the block's axes (a plant's 45° planes, diagonal UVs); the cube's directions are used then. - Panes, whose tiles are drawn with the cube's UVs (#6450), report the cube's directions as their texture. Plain `method=overlay` keeps the standard directions, since Continuity's `orient` doesn't list it; the other overlay methods follow it. - `ConnectedTextures::pick` takes the quad's texture directions lazily. Only rules with `orient=texture` ask for them, so other faces pay nothing. The mesher passes them from the quad's positions and UVs. - OptiFine's own defaults are unchanged: the cube's directions for `ctm`/`ctm_compact`, the block's `axis` for the horizontal/vertical methods. Continuity's wiki lists those as OptiFine's behaviour. **Docs used:** Continuity's wiki page "Continuity Connected Textures Specification" (the `orient` property). No mod source was read. **Checks:** `cargo fmt`. New tests: - `connect::tests::a_quads_own_texture_directions`: cube, mirrored and quarter-turned faces, plus UVs that don't span the quad, diagonal UVs, NaN and a 45° plant plane. - `connected::tests::orient_texture_follows_the_quads_uvs`: a mirrored pane face connects to the other side than with `orient=none`, and a plain overlay ignores `orient=texture`. `cargo test -p horizon-optifine --lib a_quads_own` and `cargo test -p horizon-client-render --lib connected::` (17 tests) pass. Fork CI runs on each push: https://github.com/some-du6e/horizon/actions?query=branch%3Aoptifine%2Fctm-orient-texture. 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:27 +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#6971
No description provided.