[PR #6438] [MERGED] HDR: glowing items shine, dropped, framed and held, the hand's too #6872

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

📋 Pull Request Information

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

Base: main ← Head: hdr-items


📝 Commits (2)

  • f3ae538 HDR: glowing items shine, dropped, framed and held, the hand's too
  • e03324c Merge remote-tracking branch 'origin/main' into hdr-items

📊 Changes

13 files changed (+161 additions, -26 deletions)

View changed files

📝 crates/horizon-client-render/src/dynamic_light.rs (+23 -0)
📝 crates/horizon-client-render/src/entity.wgsl (+7 -0)
📝 crates/horizon-client-render/src/gfx.rs (+73 -1)
📝 crates/horizon-client-render/src/gfx/hdr.rs (+10 -1)
📝 crates/horizon-client-render/src/hdr.wgsl (+6 -4)
📝 crates/horizon-client/src/game.rs (+2 -2)
📝 crates/horizon-client/src/game/armor_stands.rs (+1 -0)
📝 crates/horizon-client/src/game/dynamic_lights.rs (+6 -4)
📝 crates/horizon-client/src/game/item_draw.rs (+19 -5)
📝 crates/horizon-client/src/game/mob_blocks.rs (+1 -0)
📝 crates/horizon-client/src/game/shader_packs.rs (+2 -7)
📝 crates/horizon-client/src/item_render.rs (+10 -1)
📝 docs/graphics.md (+1 -1)

📄 Description

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

What and why

Follows #6308, part of #3472. Glowing items didn't shine in HDR: a torch shone once placed, but not dropped, in an item frame or in your hand. Now they do, each at the tier of its block, through the same table dynamic lights use (dynamic_light::Luminance).

  • In the world: every item drawn through the world sink (dropped, framed, held by mobs and armour stands) carries its tier, and is marked as other entities are. The translucent item sheet gets a mark as well, on both the classic and the Improved Transparency paths.
  • In your hand: #3176 keeps the hand at the world's brightness, and the arm still stays that way. A new pass writes the kept world's alpha where the hand drew: 1 for the hand, the mark for a light source it holds. HDR output reads that for hand pixels. This also stops a marked world pixel behind the arm from lifting the arm.
  • Light, with HDR on only: a glowing item uses at least its block's light level and skips the directional shading, as a placed torch does. Otherwise a held torch goes dark in the shade, and the lift only multiplies a dark pixel. The whole item gets this, so a torch's handle doesn't go dark in the shade either.

HDR off stays exactly vanilla: the tier is in the layer's high bits, which every overlay consumer masks, and the extra light depends on HDR output being on. GUI items are untouched, so the hotbar and inventory stay at UI brightness.

Dynamic lights don't interact with this: they raise the block light around a source, and this marks the item itself.

Tested

In game on an AW3423DW, on Linux: torch and other glowing items held in either hand, dropped, in item frames and held by zombies and armour stands shine, with dynamic lights on and off, and with Improved Transparency on and off. The arm stays at the world's brightness.

pr_ready --quick passes except entities::armor_stand_motion_tests::a_tick_keeps_the_previous_position_for_interpolation, which fails the same way on plain main in my Docker setup.

Not tested

  • Windows and macOS: testers welcome, especially the hand on HDR10 and scRGB swapchains.
  • The hand drawn inside the world pass (hand_in_world) gets the mark there, but I haven't exercised that path deliberately.

🤖 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/6438 **Author:** [@senjinthedragon](https://github.com/senjinthedragon) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `hdr-items` --- ### 📝 Commits (2) - [`f3ae538`](https://github.com/horizon-rust/horizon/commit/f3ae538469f6cc97f1c1e53b21a71ef82e3181c6) HDR: glowing items shine, dropped, framed and held, the hand's too - [`e03324c`](https://github.com/horizon-rust/horizon/commit/e03324cd4e7d01481579b18c239dc4922fa60a79) Merge remote-tracking branch 'origin/main' into hdr-items ### 📊 Changes **13 files changed** (+161 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/dynamic_light.rs` (+23 -0) 📝 `crates/horizon-client-render/src/entity.wgsl` (+7 -0) 📝 `crates/horizon-client-render/src/gfx.rs` (+73 -1) 📝 `crates/horizon-client-render/src/gfx/hdr.rs` (+10 -1) 📝 `crates/horizon-client-render/src/hdr.wgsl` (+6 -4) 📝 `crates/horizon-client/src/game.rs` (+2 -2) 📝 `crates/horizon-client/src/game/armor_stands.rs` (+1 -0) 📝 `crates/horizon-client/src/game/dynamic_lights.rs` (+6 -4) 📝 `crates/horizon-client/src/game/item_draw.rs` (+19 -5) 📝 `crates/horizon-client/src/game/mob_blocks.rs` (+1 -0) 📝 `crates/horizon-client/src/game/shader_packs.rs` (+2 -7) 📝 `crates/horizon-client/src/item_render.rs` (+10 -1) 📝 `docs/graphics.md` (+1 -1) </details> ### 📄 Description > 🤖 Opened by senjinthedragon's AI agent (Claude Code, Claude Opus 5.5), not by senjinthedragon personally. ## What and why Follows #6308, part of #3472. Glowing items didn't shine in HDR: a torch shone once placed, but not dropped, in an item frame or in your hand. Now they do, each at the tier of its block, through the same table dynamic lights use (`dynamic_light::Luminance`). - **In the world:** every item drawn through the world sink (dropped, framed, held by mobs and armour stands) carries its tier, and is marked as other entities are. The translucent item sheet gets a mark as well, on both the classic and the Improved Transparency paths. - **In your hand:** #3176 keeps the hand at the world's brightness, and the arm still stays that way. A new pass writes the kept world's alpha where the hand drew: 1 for the hand, the mark for a light source it holds. HDR output reads that for hand pixels. This also stops a marked world pixel behind the arm from lifting the arm. - **Light, with HDR on only:** a glowing item uses at least its block's light level and skips the directional shading, as a placed torch does. Otherwise a held torch goes dark in the shade, and the lift only multiplies a dark pixel. The whole item gets this, so a torch's handle doesn't go dark in the shade either. **HDR off stays exactly vanilla:** the tier is in the layer's high bits, which every overlay consumer masks, and the extra light depends on HDR output being on. GUI items are untouched, so the hotbar and inventory stay at UI brightness. Dynamic lights don't interact with this: they raise the block light around a source, and this marks the item itself. ## Tested In game on an AW3423DW, on Linux: torch and other glowing items held in either hand, dropped, in item frames and held by zombies and armour stands shine, with dynamic lights on and off, and with Improved Transparency on and off. The arm stays at the world's brightness. `pr_ready --quick` passes except `entities::armor_stand_motion_tests::a_tick_keeps_the_previous_position_for_interpolation`, which fails the same way on plain main in my Docker setup. ## Not tested - Windows and macOS: testers welcome, especially the hand on HDR10 and scRGB swapchains. - The hand drawn inside the world pass (`hand_in_world`) gets the mark there, but I haven't exercised that path deliberately. 🤖 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:28:28 +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#6872
No description provided.