[PR #6870] [MERGED] HDR: water gets the lighting #7161

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

📋 Pull Request Information

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

Base: main ← Head: hdr-water


📝 Commits (1)

  • a7125b5 HDR: water gets the lighting

📊 Changes

3 files changed (+77 additions, -0 deletions)

View changed files

📝 crates/horizon-client-render/src/gfx.rs (+46 -0)
📝 crates/horizon-client-render/src/gfx/flat.rs (+18 -0)
📝 crates/horizon-client-render/src/terrain.wgsl (+13 -0)

📄 Description

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

What and why

Follows #6671. HDR lighting lifted the shore but hardly a lake beside it: the translucent pass blends its alpha as coverage, which diluted the value that carries the lighting. A second pass over translucent terrain now writes it, with only alpha, for mostly opaque faces, so water takes the same light as what's around it. Faces under 60% opaque are skipped, so clear glass leaves what's behind it, light sources included, alone.

It only runs with HDR lighting on, so HDR off and shader packs don't pay for it. It does draw translucent terrain twice with HDR on, on both the classic and Improved Transparency paths and on flat draws.

Tested

In game on an AW3423DW, on Linux, by flipping between SDR and HDR and changing the strength: distant lakes lift clearly with it, shaded water stays darker than open water, and water near a torch at night gets lit. Close, shallow water lifts less, since you mostly see the bed through it. No slowdown I could see over large water. pr_ready --quick passes.

Light behind stained glass lifts less than behind clear glass. That was already so, and is left as it is: the pane is in the way.

Windows and macOS untested: testers welcome. So are low-end GPUs: does a big ocean view cost you frames with HDR on?

🤖 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/6870 **Author:** [@senjinthedragon](https://github.com/senjinthedragon) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `hdr-water` --- ### 📝 Commits (1) - [`a7125b5`](https://github.com/horizon-rust/horizon/commit/a7125b5ace5b202cd770399aa14b193e65d52d1e) HDR: water gets the lighting ### 📊 Changes **3 files changed** (+77 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/gfx.rs` (+46 -0) 📝 `crates/horizon-client-render/src/gfx/flat.rs` (+18 -0) 📝 `crates/horizon-client-render/src/terrain.wgsl` (+13 -0) </details> ### 📄 Description > 🤖 Opened by senjinthedragon's AI agent (Claude Code, Claude Opus 5.5), not by senjinthedragon personally. ## What and why Follows #6671. HDR lighting lifted the shore but hardly a lake beside it: the translucent pass blends its alpha as coverage, which diluted the value that carries the lighting. A second pass over translucent terrain now writes it, with only alpha, for mostly opaque faces, so water takes the same light as what's around it. Faces under 60% opaque are skipped, so clear glass leaves what's behind it, light sources included, alone. It only runs with HDR lighting on, so HDR off and shader packs don't pay for it. It does draw translucent terrain twice with HDR on, on both the classic and Improved Transparency paths and on flat draws. ## Tested In game on an AW3423DW, on Linux, by flipping between SDR and HDR and changing the strength: distant lakes lift clearly with it, shaded water stays darker than open water, and water near a torch at night gets lit. Close, shallow water lifts less, since you mostly see the bed through it. No slowdown I could see over large water. `pr_ready --quick` passes. Light behind stained glass lifts less than behind clear glass. That was already so, and is left as it is: the pane is in the way. Windows and macOS untested: testers welcome. So are low-end GPUs: does a big ocean view cost you frames with HDR on? 🤖 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:03 +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#7161
No description provided.