[PR #3176] [MERGED] HDR: UI Brightness, and the HUD and menus never lift #4831

Closed
opened 2026-11-03 05:08:16 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3176
Author: @senjinthedragon
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

Base: main ← Head: hdr-ui


📝 Commits (5)

  • 18c23a6 HDR: UI Brightness, and the HUD and menus never lift
  • 3ea8279 Merge remote-tracking branch 'origin/main' into hdr-ui
  • 289c2df Merge remote-tracking branch 'origin/main' into hdr-ui
  • 0b63d04 Merge main into hdr-ui: hdrUiBrightness beside main's taa and upscaling
  • 246a071 Merge main into hdr-ui: UI Brightness beside main's Black Level

📊 Changes

7 files changed (+157 additions, -7 deletions)

View changed files

📝 crates/horizon-client-render/src/gfx.rs (+8 -0)
📝 crates/horizon-client-render/src/gfx/hdr.rs (+107 -2)
📝 crates/horizon-client-render/src/graphics.rs (+10 -1)
📝 crates/horizon-client-render/src/graphics_ui.rs (+9 -0)
📝 crates/horizon-client-render/src/hdr.wgsl (+21 -3)
📝 crates/horizon-client/src/game/options.rs (+1 -0)
📝 docs/graphics.md (+1 -1)

📄 Description

🤖 Opened by Senjin's AI agent (Claude Code), not by Senjin.

What and why

Follows #2021, part of #1441. Two things about the UI with HDR on:

A fix: menu text in front of the sun was lifted to the peak. The HDR pass counts a pixel as the world when it
matches the world copy darkened evenly across its channels, which is how the vignette passes (#2638). Grey text over the
white sun matches that too, so the descriptions on the Graphics: Advanced screen flared up to the peak wherever the sun
stood behind them.

The HDR pass now knows what covers the world:

  • Once the world is kept (Hdr::keep_world), a pass zeroes the frame's alpha. The world's marks live on in the
    copy, so nothing is lost.
  • Everything drawn after raises it where it draws: the HUD, menus, text, the crosshair (invert blend) and the
    screen overlays. Both vignettes leave it (ZERO, ONE for alpha). The menu blur smears it with the colour, and
    blurred pixels fail the world check anyway.
  • The first-person hand is scaled down to 1/255 right after it's drawn (Hdr::mark_hand: a blend pass with
    ZERO, CONSTANT and a blend constant of 1/255), so it can be told apart from the UI. It's the player's hand, not
    UI: it stays at the world's brightness.
  • The last pass lifts no pixel with anything over it, keeps the hand as it is, and scales the rest by UI
    Brightness.

A setting: UI Brightness (Display, after Peak Brightness, 25–100% of paper white in steps of 5, default 100%).
Pure white labels, button outlines and the crosshair sit at paper white, which next to an evening sky is the
brightest thing on screen apart from light sources. Players can now put the HUD and menus below the world's white
without dimming the world. At 100% the picture is unchanged.

Checked in game (AW3423DW, HDR10 on KDE Plasma): description text in front of the sun no longer flares; at 50% the
HUD and menus are clearly dimmer while the world and its light sources stay as they were; the hand stays
at the world's brightness.

Conflicts with #2705, #3145 and #3152 in gfx/hdr.rs and hdr.wgsl (the HDR parameters and their uses). Whichever
lands later, I'll rebase.

Vanilla reference

Horizon-only (HDR output). Unchanged with HDR off.

Self-check

pr_ready (tools/pr_ready.py --quick on 96147d289469, against origin/main at b6c936f82, 1 min 46 s)

Check Result
Scope ✅ 7 files, +158 −8
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 398 passed (34 s)
rustfmt ✅ (8 s)
clippy ✅ (19 s)
tests: horizon-client ✅ 1261 passed (33 s)
doc tests ✅ 0 passed (11 s)
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🔄 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/3176 **Author:** [@senjinthedragon](https://github.com/senjinthedragon) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `hdr-ui` --- ### 📝 Commits (5) - [`18c23a6`](https://github.com/horizon-rust/horizon/commit/18c23a6df3af56c0529142127ec2bea9ac19ca67) HDR: UI Brightness, and the HUD and menus never lift - [`3ea8279`](https://github.com/horizon-rust/horizon/commit/3ea82790ea2b6e8846af73191dd8a952f8d58502) Merge remote-tracking branch 'origin/main' into hdr-ui - [`289c2df`](https://github.com/horizon-rust/horizon/commit/289c2df52793eecb7c436b2853f91a25646ca72f) Merge remote-tracking branch 'origin/main' into hdr-ui - [`0b63d04`](https://github.com/horizon-rust/horizon/commit/0b63d040eadca16ccbcf8feee3a7cc5fb8f6aa11) Merge main into hdr-ui: hdrUiBrightness beside main's taa and upscaling - [`246a071`](https://github.com/horizon-rust/horizon/commit/246a071dbc46677daa61c8d1806e23fea8dde820) Merge main into hdr-ui: UI Brightness beside main's Black Level ### 📊 Changes **7 files changed** (+157 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/gfx.rs` (+8 -0) 📝 `crates/horizon-client-render/src/gfx/hdr.rs` (+107 -2) 📝 `crates/horizon-client-render/src/graphics.rs` (+10 -1) 📝 `crates/horizon-client-render/src/graphics_ui.rs` (+9 -0) 📝 `crates/horizon-client-render/src/hdr.wgsl` (+21 -3) 📝 `crates/horizon-client/src/game/options.rs` (+1 -0) 📝 `docs/graphics.md` (+1 -1) </details> ### 📄 Description > 🤖 Opened by Senjin's AI agent (Claude Code), not by Senjin. ## What and why Follows #2021, part of #1441. Two things about the UI with HDR on: **A fix: menu text in front of the sun was lifted to the peak.** The HDR pass counts a pixel as the world when it matches the world copy darkened evenly across its channels, which is how the vignette passes (#2638). Grey text over the white sun matches that too, so the descriptions on the Graphics: Advanced screen flared up to the peak wherever the sun stood behind them. The HDR pass now knows what covers the world: - **Once the world is kept** (`Hdr::keep_world`), a pass zeroes the frame's alpha. The world's marks live on in the copy, so nothing is lost. - **Everything drawn after raises it** where it draws: the HUD, menus, text, the crosshair (invert blend) and the screen overlays. Both vignettes leave it (`ZERO, ONE` for alpha). The menu blur smears it with the colour, and blurred pixels fail the world check anyway. - **The first-person hand is scaled down to 1/255** right after it's drawn (`Hdr::mark_hand`: a blend pass with `ZERO, CONSTANT` and a blend constant of 1/255), so it can be told apart from the UI. It's the player's hand, not UI: it stays at the world's brightness. - **The last pass** lifts no pixel with anything over it, keeps the hand as it is, and scales the rest by UI Brightness. **A setting: UI Brightness** (Display, after Peak Brightness, 25–100% of paper white in steps of 5, default 100%). Pure white labels, button outlines and the crosshair sit at paper white, which next to an evening sky is the brightest thing on screen apart from light sources. Players can now put the HUD and menus below the world's white without dimming the world. At 100% the picture is unchanged. Checked in game (AW3423DW, HDR10 on KDE Plasma): description text in front of the sun no longer flares; at 50% the HUD and menus are clearly dimmer while the world and its light sources stay as they were; the hand stays at the world's brightness. Conflicts with #2705, #3145 and #3152 in `gfx/hdr.rs` and `hdr.wgsl` (the HDR parameters and their uses). Whichever lands later, I'll rebase. ## Vanilla reference Horizon-only (HDR output). Unchanged with HDR off. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on 96147d289469, against origin/main at b6c936f82, 1 min 46 s) | Check | Result | | --- | --- | | Scope | ✅ 7 files, +158 −8 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 398 passed (34 s) | | rustfmt | ✅ (8 s) | | clippy | ✅ (19 s) | | tests: horizon-client | ✅ 1261 passed (33 s) | | doc tests | ✅ 0 passed (11 s) | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:08:16 +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#4831
No description provided.