hdr: opt-in HDR10 output (VICTORY_HDR) #93
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ReTerryDavis--ReVIctory!93
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-92"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@rgroenewoudt on GitHub · 2026-12-05 10:43 UTC · original
rgroenewoudt:hdr-output→main· +1271 −36 · 17 files · 19 commits · draftSummary
Opt-in HDR10 output (
VICTORY_HDR=1, the launcher's HDR output switch, F1 → Display, orplay.ps1 -Hdr). Off by default. With it on and Windows HDR on, the title renders HDR itself, as on the console. We only tell it about the display, pick the swap chain's colour space and compose its planes.With HDR on, the title's own Display settings show HDR Calibration. That is where the peak is set: the calibration image goes fully white above what the display can show (400 nits here). So there is no
VICTORY_HDR_MAX_NITSorVICTORY_HDR_PAPER_WHITE: the peak is the title's calibration, and paper white is the Windows setting.Where this comes from
A port of the HDR10 output I worked on in Darner, without its two settings:
DARNER_HDR_MAX_NITSandDARNER_HDR_PAPER_WHITE(not ported: see above)Darner's later fix #130 (a card with no display of its own asks the displays of every card) is already covered: the display is looked up among the outputs of every card.
Evidence
Tested on a Dell Alienware AW3423DWF (34" QD-OLED, 3440×1440, VESA DisplayHDR True Black 400; Windows reports a 400-nit peak) with an AMD Radeon RX 9070.
XDisplayTryEnableHdrModealways returns disabled; the title renders SDR on an HDR desktop.After: with HDR on, the log shows
HDR mode: enabled ... max=400, the title's Display settings show HDR on and HDR Calibration, and above 400 nits the calibration image clips to full white (PQ reaches the display as absolute nits). Bright skies keep their detail where the SDR picture clips to white.cargo test -p victory-gpu --lib hdr: 10 passedMerge Danger
Door: two-way
Off by default. Turning it off (or reverting) gives the SDR path as before.
Blast Radius: present
The compose and present path (
compose.rs,queue.rs,present.rs) is shared with SDR. With HDR off, the title is told disabled as before and the swap chain stays SDR. Hybrid graphics may refuse HDR10 on the swap chain. That falls back to SDR with a warning.@ReTerryDavis on GitHub · 2026-12-05 17:39 UTC · original
This looks very solid overall — thanks for the real-hardware testing on HDR10 + fallback tone-mapping! Marking as draft for one small fix (and one note) before merge:
crates/victory-gpu/src/host/panel.rs/host/hdr.rs):Panel::drawcurrently callshdr.draw(...)->Overlay::make(allocating full-screenuiR8G8B8A8+sceneR10G10B10A2textures and a secondComposerPSO) beforedraw_ontochecksself.showing(). Adding an earlyif !self.showing() { return; }at the top ofPanel::drawavoids allocating those permanently on frame 1 for users who never open F1/F3.fg.overlay) or single-plane DLSS-G renders egui directly into an offscreenR10G10B10A2_UNORMtexture (out_mode == 2), blending into 2-bit alpha bands translucent panels/text. Either switching the FG HDR UI target toR16G16B16A16_FLOATor noting it as a known FG+HDR limitation is fine.Once #1 is in (and rebased if #95 lands alongside it on
launcher/window.rs), mark ready and we'll get it merged!22f4940c4ftoa65ed873fd@rgroenewoudt on GitHub · 2026-12-05 18:54 UTC · original
Good catch about the overlay translucency. I've documented it as a known limitation in code.
a65ed873fdto8479a5c464@rgroenewoudt on GitHub · 2026-12-05 19:27 UTC · original
I've gotten rid of the 2 sec timer and updated overlay to handle translucency. Waiting for other PR to merge.
@rgroenewoudt on GitHub · 2026-12-05 23:50 UTC · original
Found an issue with HDR + frame generation: HUD/subtitles is included in frame gen.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.