[PR #7536] Models: per-face light, colour, AO and render types #7654

Open
opened 2026-11-03 07:21:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7536
Author: @UMCEKO
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: models/neoforge-face-data


📝 Commits (1)

  • 32a4e05 Models: per-face light, colour, AO and render types

📊 Changes

8 files changed (+289 additions, -16 deletions)

View changed files

📝 crates/horizon-assets/src/bake.rs (+54 -2)
📝 crates/horizon-assets/src/model.rs (+83 -0)
📝 crates/horizon-assets/src/resolve.rs (+101 -0)
📝 crates/horizon-client-render/src/breaking.rs (+4 -0)
📝 crates/horizon-client-render/src/mesher.rs (+17 -4)
📝 crates/horizon-client-render/src/mesher/lighting.rs (+13 -7)
📝 crates/horizon-client-render/src/models/catalog.rs (+13 -3)
📝 crates/horizon-client-render/src/models/cube.rs (+4 -0)

📄 Description

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

Mods light and layer parts of their block models with keys Horizon ignored, so AE2's controller and cell lights and Mekanism's LEDs drew unlit, and mods' cutout and translucent parts drew in the block's default layer. This decodes them and uses them when meshing chunks:

  • Per-face data on elements and faces (block_light, sky_light, color, ambient_occlusion; a face overrides its element key by key), and a face-level light_emission.
  • render_type on a model (solid, cutout, cutout_mipped, translucent, tripwire; inherited from the parent chain, the leaf wins, minecraft: stripped).

How they apply:

  • Baked quads carry a (block, sky) light minimum, and the mesher raises each channel on its own. Vanilla quads get [emission, emission], so their output is unchanged.
  • color multiplies into the quad's tint; ambient_occlusion overrides the model's for that quad.
  • render_type picks the quad's pass, per quad: solid opaque, cutout alpha-tested, translucent (and tripwire) in the translucent pass.

Left out: cutout_mipped is the same as cutout; tripwire draws in the translucent pass; color alpha is ignored; item, minecart and mob-skin rendering still read only light_emission.

Closes #7492

pr_ready (tools/pr_ready.py --quick, against origin/main at a7621348a; rebased onto 43d532289 since, cargo test -p horizon-assets -p horizon-client-render --lib and clippy rerun clean)

Check Result
Scope ✅ 8 files, +289 −16
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 614 passed
rustfmt ✅
clippy ✅
tests: horizon-assets, horizon-client-render ✅ 1193 passed
doc tests ✅ 0 passed
content root tests ✅ 24 passed
Parity ➖ 360 affected, to run in CI (--quick)
Label feature

🤖 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/7536 **Author:** [@UMCEKO](https://github.com/UMCEKO) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `models/neoforge-face-data` --- ### 📝 Commits (1) - [`32a4e05`](https://github.com/horizon-rust/horizon/commit/32a4e05ba04589ded591f512bf40de5b132da1c0) Models: per-face light, colour, AO and render types ### 📊 Changes **8 files changed** (+289 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-assets/src/bake.rs` (+54 -2) 📝 `crates/horizon-assets/src/model.rs` (+83 -0) 📝 `crates/horizon-assets/src/resolve.rs` (+101 -0) 📝 `crates/horizon-client-render/src/breaking.rs` (+4 -0) 📝 `crates/horizon-client-render/src/mesher.rs` (+17 -4) 📝 `crates/horizon-client-render/src/mesher/lighting.rs` (+13 -7) 📝 `crates/horizon-client-render/src/models/catalog.rs` (+13 -3) 📝 `crates/horizon-client-render/src/models/cube.rs` (+4 -0) </details> ### 📄 Description > 🤖 Opened by UMCEKO's AI agent (Claude Code, Claude Opus 5.5), not by UMCEKO personally. Mods light and layer parts of their block models with keys Horizon ignored, so AE2's controller and cell lights and Mekanism's LEDs drew unlit, and mods' cutout and translucent parts drew in the block's default layer. This decodes them and uses them when meshing chunks: - Per-face data on elements and faces (`block_light`, `sky_light`, `color`, `ambient_occlusion`; a face overrides its element key by key), and a face-level `light_emission`. - `render_type` on a model (`solid`, `cutout`, `cutout_mipped`, `translucent`, `tripwire`; inherited from the parent chain, the leaf wins, `minecraft:` stripped). How they apply: - Baked quads carry a (block, sky) light minimum, and the mesher raises each channel on its own. Vanilla quads get `[emission, emission]`, so their output is unchanged. - `color` multiplies into the quad's tint; `ambient_occlusion` overrides the model's for that quad. - `render_type` picks the quad's pass, per quad: solid opaque, cutout alpha-tested, translucent (and tripwire) in the translucent pass. Left out: `cutout_mipped` is the same as `cutout`; `tripwire` draws in the translucent pass; `color` alpha is ignored; item, minecart and mob-skin rendering still read only `light_emission`. Closes #7492 **pr_ready** (`tools/pr_ready.py --quick`, against origin/main at a7621348a; rebased onto 43d532289 since, `cargo test -p horizon-assets -p horizon-client-render --lib` and clippy rerun clean) | Check | Result | | --- | --- | | Scope | ✅ 8 files, +289 −16 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 614 passed | | rustfmt | ✅ | | clippy | ✅ | | tests: horizon-assets, horizon-client-render | ✅ 1193 passed | | doc tests | ✅ 0 passed | | content root tests | ✅ 24 passed | | Parity | ➖ 360 affected, to run in CI (--quick) | | Label | `feature` | 🤖 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>
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#7654
No description provided.