[PR #2100] [MERGED] Item frames: shade the frame model by face and light glow frames from 5 #4004

Closed
opened 2026-11-03 04:13:57 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2100
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/1436-item-frame-light


📝 Commits (1)

  • 49b167c Item frames: shade the frame model by face and light glow frames from 5

📊 Changes

1 file changed (+15 additions, -4 deletions)

View changed files

📝 crates/horizon-client/src/game/frames.rs (+15 -4)

📄 Description

What and why

Item frames are lit wrongly in two ways:

  • The frame model had no directional shading. Vanilla draws it with the entity shader, so each face is lit by its normal (top bright, sides and bottom darker). Horizon drew it with one flat colour.
  • A glow item frame's model should be at least block light 5 bright (GLOW_FRAME_BRIGHTNESS). Horizon used the block's own light level.

Fix: the frame model's vertices now carry the face normal in the same form the mob models use, so the entity shader shades them, and a glow frame's model light is raised to at least 5.

Fixes #1436.

Vanilla reference

  • ItemFrameRenderer.getBlockLightLevel and GLOW_FRAME_BRIGHTNESS
  • ItemFrameRenderer.submit (frame model drawn through submitWithZOffset, entity shader with the face normal)
  • VertexConsumer.putBakedQuad (normal from the quad direction)

Self-check

cargo check -p horizon-client passes.


🔄 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/2100 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/1436-item-frame-light` --- ### 📝 Commits (1) - [`49b167c`](https://github.com/horizon-rust/horizon/commit/49b167ce22c9c40bde3a122a84ff84f1b7cd4bb8) Item frames: shade the frame model by face and light glow frames from 5 ### 📊 Changes **1 file changed** (+15 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/frames.rs` (+15 -4) </details> ### 📄 Description ## What and why Item frames are lit wrongly in two ways: - The frame model had no directional shading. Vanilla draws it with the entity shader, so each face is lit by its normal (top bright, sides and bottom darker). Horizon drew it with one flat colour. - A glow item frame's model should be at least block light 5 bright (`GLOW_FRAME_BRIGHTNESS`). Horizon used the block's own light level. Fix: the frame model's vertices now carry the face normal in the same form the mob models use, so the entity shader shades them, and a glow frame's model light is raised to at least 5. Fixes #1436. ## Vanilla reference - `ItemFrameRenderer.getBlockLightLevel` and `GLOW_FRAME_BRIGHTNESS` - `ItemFrameRenderer.submit` (frame model drawn through `submitWithZOffset`, entity shader with the face normal) - `VertexConsumer.putBakedQuad` (normal from the quad direction) ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:13:57 +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#4004
No description provided.