[PR #6450] [MERGED] OptiFine packs: connected glass panes join seamlessly, borders on the right side #6881

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

📋 Pull Request Information

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

Base: main ← Head: optifine/ctm-panes


📝 Commits (6)

  • 9fbd459 OptiFine CTM overlays: drawn the standard way up, in the face's pieces
  • 28e10cb OptiFine CTM: connected glass panes look as OptiFine draws them
  • ec627f2 OptiFine CTM panes: cube UVs only when drawn; pin every arm in the test
  • 80b5aaf OptiFine CTM panes: tile rules on a pane's sprites connect it too
  • a8f55af OptiFine CTM panes: only a tile rule that can draw on a pane connects it
  • 723fbc2 OptiFine CTM panes: hide strips only on the block's top and bottom planes

📊 Changes

4 files changed (+193 additions, -5 deletions)

View changed files

📝 crates/horizon-client-render/src/connected.rs (+106 -0)
📝 crates/horizon-client-render/src/mesher.rs (+85 -5)
📝 crates/horizon-client-render/src/mesher/leaf_culling.rs (+1 -0)
📝 crates/horizon-client-render/src/mesher/visibility_tests.rs (+1 -0)

📄 Description

OptiFine packs ship connected textures for glass panes, and they still didn't look as they do in OptiFine:

  1. Borders on the wrong side. Vanilla's pane models mirror the texture on some faces. OptiFine replaces the pane models so they don't, and Continuity's spec notes the difference. Horizon chose a pane tile from the face's standard directions but drew it through the mirrored UVs. On those faces the border meant for the open side was drawn on the side touching the next pane.
  2. Seams between stacked panes. A pane stacked on another still drew its top and bottom edge strips, so a two-high window had a line across the middle. Continuity ships a built-in pack ("Glass Pane Culling Fix") that culls those faces so connected panes look seamless.

Depends on #6446 (its commit is at the bottom of this branch; this PR reuses its standard_uv). Review only the last commit.

  • On a glass pane (IronBarsBlock whose name ends in glass_pane), a quad that draws a connected-texture tile takes the UVs a vanilla cube gives its corners (standard_uv). Quads that keep their own sprite are unchanged.
  • ConnectedTextures::stacked_pane_hides: a pane with connected-texture rules (naming the pane, or the sprites on its sides) hides a top or bottom strip when the pane above or below is the same block and has the same part there (the post, or the arm toward that strip). A strip over an arm the other pane doesn't have stays, so nothing opens up.
  • Panes without CTM rules (vanilla, or packs without pane CTM) draw exactly as before. Iron bars are untouched.

Docs used: Continuity's wiki page "Continuity Connected Textures Specification" (the orient section, on vanilla's reflected pane textures and OptiFine's pane models) and its README (the Glass Pane Culling Fix pack). Vanilla's default face UVs. No mod source was read.

Checks: cargo fmt; cargo test -p horizon-client-render --lib connected:: (15 tests, one new: stacked_panes_hide_the_strips_they_share, hand-worked cases). Fork CI runs on each push: https://github.com/some-du6e/horizon/actions?query=branch%3Aoptifine%2Fctm-panes. 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/6450 **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/ctm-panes` --- ### 📝 Commits (6) - [`9fbd459`](https://github.com/horizon-rust/horizon/commit/9fbd459b63aa31c84e7212e8ff9908d6d08c44aa) OptiFine CTM overlays: drawn the standard way up, in the face's pieces - [`28e10cb`](https://github.com/horizon-rust/horizon/commit/28e10cbf9575efcae1821c1776df9d49d85ccbd4) OptiFine CTM: connected glass panes look as OptiFine draws them - [`ec627f2`](https://github.com/horizon-rust/horizon/commit/ec627f27bb89022e49939c1b7a53f08e34303e7a) OptiFine CTM panes: cube UVs only when drawn; pin every arm in the test - [`80b5aaf`](https://github.com/horizon-rust/horizon/commit/80b5aaf80dfba63b22a090698e3dc62f2bf92aed) OptiFine CTM panes: tile rules on a pane's sprites connect it too - [`a8f55af`](https://github.com/horizon-rust/horizon/commit/a8f55afe52a94a500963d5b4bc01f629c98602bc) OptiFine CTM panes: only a tile rule that can draw on a pane connects it - [`723fbc2`](https://github.com/horizon-rust/horizon/commit/723fbc2c8d90ab85a1b8e815c29098209d703a3f) OptiFine CTM panes: hide strips only on the block's top and bottom planes ### 📊 Changes **4 files changed** (+193 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/connected.rs` (+106 -0) 📝 `crates/horizon-client-render/src/mesher.rs` (+85 -5) 📝 `crates/horizon-client-render/src/mesher/leaf_culling.rs` (+1 -0) 📝 `crates/horizon-client-render/src/mesher/visibility_tests.rs` (+1 -0) </details> ### 📄 Description OptiFine packs ship connected textures for glass panes, and they still didn't look as they do in OptiFine: 1. **Borders on the wrong side.** Vanilla's pane models mirror the texture on some faces. OptiFine replaces the pane models so they don't, and Continuity's spec notes the difference. Horizon chose a pane tile from the face's standard directions but drew it through the mirrored UVs. On those faces the border meant for the open side was drawn on the side touching the next pane. 2. **Seams between stacked panes.** A pane stacked on another still drew its top and bottom edge strips, so a two-high window had a line across the middle. Continuity ships a built-in pack ("Glass Pane Culling Fix") that culls those faces so connected panes look seamless. **Depends on #6446** (its commit is at the bottom of this branch; this PR reuses its `standard_uv`). Review only the last commit. - On a glass pane (`IronBarsBlock` whose name ends in `glass_pane`), a quad that draws a connected-texture tile takes the UVs a vanilla cube gives its corners (`standard_uv`). Quads that keep their own sprite are unchanged. - `ConnectedTextures::stacked_pane_hides`: a pane with connected-texture rules (naming the pane, or the sprites on its sides) hides a top or bottom strip when the pane above or below is the same block and has the same part there (the post, or the arm toward that strip). A strip over an arm the other pane doesn't have stays, so nothing opens up. - Panes without CTM rules (vanilla, or packs without pane CTM) draw exactly as before. Iron bars are untouched. **Docs used:** Continuity's wiki page "Continuity Connected Textures Specification" (the `orient` section, on vanilla's reflected pane textures and OptiFine's pane models) and its README (the Glass Pane Culling Fix pack). Vanilla's default face UVs. No mod source was read. **Checks:** `cargo fmt`; `cargo test -p horizon-client-render --lib connected::` (15 tests, one new: `stacked_panes_hide_the_strips_they_share`, hand-worked cases). Fork CI runs on each push: https://github.com/some-du6e/horizon/actions?query=branch%3Aoptifine%2Fctm-panes. 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:28:33 +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#6881
No description provided.