[PR #6471] [MERGED] HDR: light sources keep shining under water #6897

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

📋 Pull Request Information

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

Base: main ← Head: hdr-underwater


📝 Commits (2)

📊 Changes

3 files changed (+67 additions, -12 deletions)

View changed files

📝 crates/horizon-client-render/src/gfx.rs (+47 -4)
📝 crates/horizon-client-render/src/gfx/hdr.rs (+2 -1)
📝 crates/horizon-client-render/src/screen_effects.rs (+18 -7)

📄 Description

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

What and why

Follows #3176. With the eye under water, nothing shone in HDR: no sea lanterns, no glowstone, no lava. The underwater overlay is a screen effect drawn with alpha blending, so it raised the frame's alpha, and HDR output reads a raised alpha as something covering the world. For the frames while the eye crosses the surface the overlay isn't drawn yet, so light sources flickered back on there, which is how this turned up.

The overlay tints the whole view rather than covering it, so with HDR on it now:

  • writes colour only, which leaves the frame's alpha alone, and
  • tints the kept world the same way, because HDR output compares the frame with the kept world to see whether a pixel still shows the world.

The other screen effects (the block you're inside, fire) really do cover the view, and stay as they are. HDR off draws exactly as before: same pipeline, same order.

Tested

In game on an AW3423DW, on Linux, on top of the current HDR work: a sea lantern and a powered conduit under water, seen from under water, and in HORIZON_HDR_DEBUG=1, where the sea lantern stays coloured. Crossing the surface no longer changes the shine.

Windows and macOS untested: testers welcome.

🤖 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/6471 **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-underwater` --- ### 📝 Commits (2) - [`a503ce4`](https://github.com/horizon-rust/horizon/commit/a503ce42c900d7df5ddc33fc2fa53a1a3827e3fd) HDR: light sources keep shining under water - [`bc22eb0`](https://github.com/horizon-rust/horizon/commit/bc22eb04e75b7932aee3e5e604ae92cbe513d78f) Merge main into #6471 ### 📊 Changes **3 files changed** (+67 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/gfx.rs` (+47 -4) 📝 `crates/horizon-client-render/src/gfx/hdr.rs` (+2 -1) 📝 `crates/horizon-client-render/src/screen_effects.rs` (+18 -7) </details> ### 📄 Description > 🤖 Opened by senjinthedragon's AI agent (Claude Code, Claude Opus 5.5), not by senjinthedragon personally. ## What and why Follows #3176. With the eye under water, nothing shone in HDR: no sea lanterns, no glowstone, no lava. The underwater overlay is a screen effect drawn with alpha blending, so it raised the frame's alpha, and HDR output reads a raised alpha as something covering the world. For the frames while the eye crosses the surface the overlay isn't drawn yet, so light sources flickered back on there, which is how this turned up. The overlay tints the whole view rather than covering it, so with HDR on it now: - writes colour only, which leaves the frame's alpha alone, and - tints the kept world the same way, because HDR output compares the frame with the kept world to see whether a pixel still shows the world. The other screen effects (the block you're inside, fire) really do cover the view, and stay as they are. HDR off draws exactly as before: same pipeline, same order. ## Tested In game on an AW3423DW, on Linux, on top of the current HDR work: a sea lantern and a powered conduit under water, seen from under water, and in `HORIZON_HDR_DEBUG=1`, where the sea lantern stays coloured. Crossing the surface no longer changes the shine. Windows and macOS untested: testers welcome. 🤖 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:47 +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#6897
No description provided.