[PR #5257] [MERGED] HDR: calibration, full screen, one test picture at a time (finished from #4923) #6169

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

📋 Pull Request Information

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

Base: main ← Head: agent/finish-4923


📝 Commits (1)

  • 9c63ab1 HDR calibration: end it off the Options screen; don't save its fullscreen

📊 Changes

2 files changed (+10 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+5 -0)
📝 crates/horizon-client/src/game/options.rs (+5 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Finished from #4923 by @senjinthedragon (their two commits keep their authorship): HDR calibration, full screen, one test picture at a time.

On top, the two fixes rdbtCVS's review asked for:

  • The calibration ends whenever the screen leaves Options, not only on Close: a server opening the death screen left the test picture over every frame and the window borderless (hud_layers now calls show_calibration while one is running off Options).
  • observe_fullscreen ignores the calibration's own fullscreen, so it is no longer saved as the player's Fullscreen option (a crash mid-calibration started a windowed player fullscreen).

HDR is off by default and Horizon-only; SDR is unchanged.


Original description (#4923):

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

What and why

Follows #3203 (the HDR screen), #3145 (Black Level) and #3461 (Auto from the compositor). Where the system doesn't say how bright the display gets, players have to set Black Level, Peak
Brightness and Paper White by number, and most can't know them. HDR games solve that with a calibration: a few
full-screen test pictures, one setting each. Graphics: HDR gets one, and it tells players when they don't need it.

The calibration (Calibrate... on Graphics: HDR; new hdr_calibration.rs):

  • Three steps, full screen (borderless, restored afterwards), each a slider, Back/Next, and one line of help:
    1. Black Level: Horizon's logo at the slider's level on true black. "Lower it until the logo just disappears
      into the black."
    2. Peak Brightness: a square of 10% of the screen at 10 000 nits with the logo at the slider's level. "Raise it
      until the logo just disappears into the bright square." The square stays small and the rest dark, so an OLED's
      brightness limiter doesn't dim the picture under test. During this step the HDR metadata declares 10 000 nits,
      so a compositor doesn't clip the square to the current peak.
    3. Paper White: a white card on a dark grey. "Make the card a white that's comfortable to look at for a long
      time, in the light you play in." (A paper match fails in a dark room: even 10 nits is brighter than paper
      there. Paper White now goes down to 10.)
  • Save writes all three, Cancel or Esc keeps what was there. A step left untouched keeps Auto.
  • The test pictures are drawn by hdr.wgsl itself, straight in nits, so they don't go through the frame's 8-bit
    SDR path. The logo is the white of horizon_theme::ICON_PNG (one exact colour: a true 1-bit shape), as an R8Unorm
    mask.

Telling players they don't need it. Where the system reports the display's brightness (#3461), the values are
already right, and a "Calibrate" button invites players who are used to calibrating every HDR game to set them over
by hand. So, in plain words:

Button Beside it
The system reported Calibrate Anyway... "Already set up for your display. Only calibrate if HDR looks wrong."
Reported, but changed by hand Use Automatic Setup (puts both back on Auto) "Puts Peak Brightness and Paper White back to your display's setup."
Nothing reported Calibrate... "Your display didn't say how bright it gets: calibrate to set it up."

Peak Brightness and Paper White say "Set up for your display. Leave on Auto unless it looks wrong." where the
system reported.

What's checked, and what isn't. On Hyprland 0.57 (AW3423DW) all three steps work: with Hyprland's own tone mapping off for the window (a tonemap = "off" window rule), the logo disappears at 1000 in the Peak step, the panel's HDR 1000 rating. On KWin (Plasma 6) Black Level works, but the Peak step can't: KWin maps content relative to its reference white and tone-maps near the peak, so the logo never disappears. That's the compositor, not the test picture, and it's why this PR steers KWin players away from calibrating. Windows passes the signal through and should behave like Hyprland, but is untested here: a Windows tester with an HDR display would be welcome. This rebased version hasn't been run on macOS either.

Size. About 720 lines of its own, over the ~500 guideline: hdr_calibration.rs (the steps, input, layout,
tests) is most of it, and the rest wires it into the HDR pass, the options screens and the fullscreen handling.
Split, one half would be a screen nobody can open, or a button with nothing behind it.

Vanilla reference

Horizon-only (Horizon's graphics settings). Vanilla's Video Settings are unchanged.

Self-check

tools/pr_ready.py --quick: 11 files, +692 −35; rustfmt, clippy and 1959 tests (horizon-client, horizon-client-render) pass.

🤖 Generated with Claude Code

🤖 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/5257 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `agent/finish-4923` --- ### 📝 Commits (1) - [`9c63ab1`](https://github.com/horizon-rust/horizon/commit/9c63ab14e965040bb405c157fe135b54b5223130) HDR calibration: end it off the Options screen; don't save its fullscreen ### 📊 Changes **2 files changed** (+10 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+5 -0) 📝 `crates/horizon-client/src/game/options.rs` (+5 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Finished from #4923 by @senjinthedragon (their two commits keep their authorship): HDR calibration, full screen, one test picture at a time. On top, the two fixes rdbtCVS's review asked for: - The calibration ends whenever the screen leaves Options, not only on Close: a server opening the death screen left the test picture over every frame and the window borderless (`hud_layers` now calls `show_calibration` while one is running off Options). - `observe_fullscreen` ignores the calibration's own fullscreen, so it is no longer saved as the player's Fullscreen option (a crash mid-calibration started a windowed player fullscreen). HDR is off by default and Horizon-only; SDR is unchanged. --- Original description (#4923): > 🤖 Opened by senjinthedragon's AI agent (Claude Code, Claude Opus 5.5), not by senjinthedragon personally. ## What and why Follows #3203 (the HDR screen), #3145 (Black Level) and #3461 (Auto from the compositor). Where the system doesn't say how bright the display gets, players have to set Black Level, Peak Brightness and Paper White by number, and most can't know them. HDR games solve that with a calibration: a few full-screen test pictures, one setting each. Graphics: HDR gets one, and it tells players when they don't need it. **The calibration** (**Calibrate...** on Graphics: HDR; new `hdr_calibration.rs`): - Three steps, full screen (borderless, restored afterwards), each a slider, Back/Next, and one line of help: 1. **Black Level:** Horizon's logo at the slider's level on true black. "Lower it until the logo just disappears into the black." 2. **Peak Brightness:** a square of 10% of the screen at 10 000 nits with the logo at the slider's level. "Raise it until the logo just disappears into the bright square." The square stays small and the rest dark, so an OLED's brightness limiter doesn't dim the picture under test. During this step the HDR metadata declares 10 000 nits, so a compositor doesn't clip the square to the current peak. 3. **Paper White:** a white card on a dark grey. "Make the card a white that's comfortable to look at for a long time, in the light you play in." (A paper match fails in a dark room: even 10 nits is brighter than paper there. Paper White now goes down to 10.) - **Save** writes all three, **Cancel** or Esc keeps what was there. A step left untouched keeps Auto. - The test pictures are drawn by `hdr.wgsl` itself, straight in nits, so they don't go through the frame's 8-bit SDR path. The logo is the white of `horizon_theme::ICON_PNG` (one exact colour: a true 1-bit shape), as an `R8Unorm` mask. **Telling players they don't need it.** Where the system reports the display's brightness (#3461), the values are already right, and a "Calibrate" button invites players who are used to calibrating every HDR game to set them over by hand. So, in plain words: | | Button | Beside it | | --- | --- | --- | | The system reported | **Calibrate Anyway...** | "Already set up for your display. Only calibrate if HDR looks wrong." | | Reported, but changed by hand | **Use Automatic Setup** (puts both back on Auto) | "Puts Peak Brightness and Paper White back to your display's setup." | | Nothing reported | **Calibrate...** | "Your display didn't say how bright it gets: calibrate to set it up." | Peak Brightness and Paper White say "Set up for your display. Leave on Auto unless it looks wrong." where the system reported. **What's checked, and what isn't.** On Hyprland 0.57 (AW3423DW) all three steps work: with Hyprland's own tone mapping off for the window (a `tonemap = "off"` window rule), the logo disappears at 1000 in the Peak step, the panel's HDR 1000 rating. On KWin (Plasma 6) Black Level works, but the Peak step can't: KWin maps content relative to its reference white and tone-maps near the peak, so the logo never disappears. That's the compositor, not the test picture, and it's why this PR steers KWin players away from calibrating. Windows passes the signal through and should behave like Hyprland, but is untested here: a Windows tester with an HDR display would be welcome. This rebased version hasn't been run on macOS either. **Size.** About 720 lines of its own, over the ~500 guideline: `hdr_calibration.rs` (the steps, input, layout, tests) is most of it, and the rest wires it into the HDR pass, the options screens and the fullscreen handling. Split, one half would be a screen nobody can open, or a button with nothing behind it. ## Vanilla reference Horizon-only (Horizon's graphics settings). Vanilla's Video Settings are unchanged. ## Self-check `tools/pr_ready.py --quick`: 11 files, +692 −35; rustfmt, clippy and 1959 tests (horizon-client, horizon-client-render) pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) 🤖 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:15:27 +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#6169
No description provided.