[PR #6936] [MERGED] Shader packs: Iris's customTexture.<name> textures #7210

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6936
Author: @arslanarm
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: shaderpacks/custom-texture-3d


📝 Commits (1)

  • 5131f3f Shader packs: Iris's customTexture. textures

📊 Changes

3 files changed (+120 additions, -23 deletions)

View changed files

📝 crates/horizon-client-render/src/gfx/pack_textures.rs (+60 -5)
📝 crates/horizon-shaders/src/lib.rs (+3 -2)
📝 crates/horizon-shaders/src/textures.rs (+57 -16)

📄 Description

🤖 Opened by arslanarm's AI agent (Claude Code, Claude Opus 5.5), not by arslanarm personally.

What and why

Part of #6812.

Iris's enhanced custom textures, customTexture.<name> = <path> [<type> <internalFormat> <dimensions> <pixelFormat> <pixelType>], give a sampler of its own that every program may read, from the same sources as OptiFine's texture.<stage>.<name> (ShaderDoc, "Enhanced Custom Textures"). Horizon read only texture.*, so with Shrimple v0.12 Horizon logged "sampler3D texClouds is not provided yet" for its composite12, 13, 14, 17, 18, gbuffers_textured, gbuffers_textured_lit and gbuffers_weather programs (32 notes over a 3-scene run), and those programs read a blank.

  • horizon-shaders: load_textures reads customTexture.* too, with the stage EVERY_STAGE.
  • gfx/pack_textures.rs: a sampler finds a customTexture by its own name and dimension when its stage has no texture.<stage> of that name (that one still comes first); notes name the customTexture.<name> key.

Black-box checks with probe packs written for this (run in Iris 1.11.7 + Sodium 0.9.2 on 26.3 and in Horizon, one scene; the final pass paints one stripe per texel):

  • A raw 2×2×2 TEXTURE_3D RGBA8 customTexture read with texelFetch: Iris shows the 8 texels with x fastest, then y, then z. This branch shows the same values (main: all black, "sampler3D lut is not provided yet").
  • A 2×2 PNG customTexture read with texelFetch and texture(): same texels and orientation in both (the top row at v = 0.25).

Measured against main at 78383948d:

  • Translation (real_packs, 40 packs, SHOW_ERRORS=1): identical (313 skipped programs on both).
  • Horizon's own loader counts customTexture entries in 5 of the 40 packs: Shrimple, Solas, Clarity, and RenderPearl and Visual Vibrance (both still refused for iris.features.required).
  • Shrimple: "not provided yet" notes over the same 3-scene run 39 → 9. Its picture stays black, as on main, also with #6875 underneath: it still needs its custom image imgLocalBlockMask, the game's minecraft:textures/environment/clouds.png (another customTexture, a resource Horizon doesn't resolve yet) and a shadow program with a geometry stage.
  • Pictures (fast build, 3 scenes, mean difference to Iris 1.11.7, main → this branch): Solas 6.4 → 6.3, 6.1 → 5.9, 1.5 → 1.5; Clarity 13.2 → 14.7, 9.0 → 9.0, 16.4 → 16.4; BSL and Complementary (no customTexture) unchanged. Run-to-run noise between the two builds on the control packs is up to 1.3 (BSL at noon).

Tests: custom_textures_are_for_every_stage (horizon-shaders: a raw 3D customTexture read for every stage, texel order) and custom_textures_reach_every_program (render: every program group finds it, a stage's own texture.* first, no buffer aliases); both fail on main.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

Horizon-only (shader packs; vanilla has no such feature). Sources: ShaderDoc's "Enhanced Custom Textures (Iris 1.5)", and black-box runs of Iris 1.11.7 with probe packs of our own.

Other projects' code

none. No Iris, OptiFine or pack code read; Shrimple, Solas and Clarity were only run as black boxes.

Self-check

pr_ready (tools/pr_ready.py --quick on plony-pc, against origin/main at 78383948d, 3 min 10 s)

Check Result
Scope ✅ 3 files, +120 −23
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 610 run, FAILED (failures=1, skipped=1) (32 s)
rustfmt ✅ (7 s)
clippy ✅ (1 min 45 s)
tests: horizon-client-render, horizon-shaders ❌ 1082 passed, 1 failed (45 s)
doc tests ✅ 0 passed (1 s)
content root tests ➖ content root untouched
mod API up to date ➖ native hooks 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)

The two failures are not this branch's: test_world_input_capture.test_native_split_mouse_turns_only_its_owner (Python) and gfx::entity_skin::tests::the_shader_writes_what_the_cpu_reference_computes (GPU, exact bytes) fail the same way on main 78383948d on this machine.

🤖 Generated with 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/6936 **Author:** [@arslanarm](https://github.com/arslanarm) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `shaderpacks/custom-texture-3d` --- ### 📝 Commits (1) - [`5131f3f`](https://github.com/horizon-rust/horizon/commit/5131f3f960d29fd529054dfd3a7257b5c3ebbaf4) Shader packs: Iris's customTexture.<name> textures ### 📊 Changes **3 files changed** (+120 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/gfx/pack_textures.rs` (+60 -5) 📝 `crates/horizon-shaders/src/lib.rs` (+3 -2) 📝 `crates/horizon-shaders/src/textures.rs` (+57 -16) </details> ### 📄 Description > 🤖 Opened by arslanarm's AI agent (Claude Code, Claude Opus 5.5), not by arslanarm personally. ## What and why Part of #6812. Iris's enhanced custom textures, `customTexture.<name> = <path> [<type> <internalFormat> <dimensions> <pixelFormat> <pixelType>]`, give a sampler of its own that every program may read, from the same sources as OptiFine's `texture.<stage>.<name>` (ShaderDoc, "Enhanced Custom Textures"). Horizon read only `texture.*`, so with Shrimple v0.12 Horizon logged "`sampler3D texClouds` is not provided yet" for its `composite12`, `13`, `14`, `17`, `18`, `gbuffers_textured`, `gbuffers_textured_lit` and `gbuffers_weather` programs (32 notes over a 3-scene run), and those programs read a blank. - `horizon-shaders`: `load_textures` reads `customTexture.*` too, with the stage `EVERY_STAGE`. - `gfx/pack_textures.rs`: a sampler finds a `customTexture` by its own name and dimension when its stage has no `texture.<stage>` of that name (that one still comes first); notes name the `customTexture.<name>` key. **Black-box checks with probe packs written for this** (run in Iris 1.11.7 + Sodium 0.9.2 on 26.3 and in Horizon, one scene; the `final` pass paints one stripe per texel): - A raw 2×2×2 `TEXTURE_3D RGBA8` `customTexture` read with `texelFetch`: Iris shows the 8 texels with x fastest, then y, then z. This branch shows the same values (main: all black, "`sampler3D lut` is not provided yet"). - A 2×2 PNG `customTexture` read with `texelFetch` and `texture()`: same texels and orientation in both (the top row at v = 0.25). **Measured** against main at 78383948d: - Translation (`real_packs`, 40 packs, `SHOW_ERRORS=1`): identical (313 skipped programs on both). - Horizon's own loader counts `customTexture` entries in 5 of the 40 packs: Shrimple, Solas, Clarity, and RenderPearl and Visual Vibrance (both still refused for `iris.features.required`). - Shrimple: "not provided yet" notes over the same 3-scene run 39 → 9. Its picture stays black, as on main, also with #6875 underneath: it still needs its custom image `imgLocalBlockMask`, the game's `minecraft:textures/environment/clouds.png` (another `customTexture`, a resource Horizon doesn't resolve yet) and a shadow program with a geometry stage. - Pictures (fast build, 3 scenes, mean difference to Iris 1.11.7, main → this branch): Solas 6.4 → 6.3, 6.1 → 5.9, 1.5 → 1.5; Clarity 13.2 → 14.7, 9.0 → 9.0, 16.4 → 16.4; BSL and Complementary (no `customTexture`) unchanged. Run-to-run noise between the two builds on the control packs is up to 1.3 (BSL at noon). Tests: `custom_textures_are_for_every_stage` (horizon-shaders: a raw 3D `customTexture` read for every stage, texel order) and `custom_textures_reach_every_program` (render: every program group finds it, a stage's own `texture.*` first, no buffer aliases); both fail on main. ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [x] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference Horizon-only (shader packs; vanilla has no such feature). Sources: ShaderDoc's "Enhanced Custom Textures (Iris 1.5)", and black-box runs of Iris 1.11.7 with probe packs of our own. ## Other projects' code none. No Iris, OptiFine or pack code read; Shrimple, Solas and Clarity were only run as black boxes. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on plony-pc, against origin/main at 78383948d, 3 min 10 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +120 −23 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 610 run, FAILED (failures=1, skipped=1) (32 s) | | rustfmt | ✅ (7 s) | | clippy | ✅ (1 min 45 s) | | tests: horizon-client-render, horizon-shaders | ❌ 1082 passed, 1 failed (45 s) | | doc tests | ✅ 0 passed (1 s) | | content root tests | ➖ content root untouched | | mod API up to date | ➖ native hooks 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) | The two failures are not this branch's: `test_world_input_capture.test_native_split_mouse_turns_only_its_owner` (Python) and `gfx::entity_skin::tests::the_shader_writes_what_the_cpu_reference_computes` (GPU, exact bytes) fail the same way on main 78383948d on this machine. 🤖 Generated with [Claude Code](https://claude.com/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:35:45 +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#7210
No description provided.