From 3529eff9494c808288fdaec53923c58a17f966bb Mon Sep 17 00:00:00 2001 From: chrg6 Date: Wed, 11 Nov 2026 14:56:46 -0500 Subject: [PATCH] Offer both kinds of HDR in the menu again: the tone mapped picture and the game's own. The HDR row lists Off, RenoDX (the game's picture tone mapped to the display, the one fixed look) and Native (the game's own HDR, taken up at the next start), with the peak, game and HUD whites under either. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- docs/README-BuildKit.md | 2 +- nx2navi.ini.example | 10 +++++----- runtime/cfg.c | 4 ++-- runtime/ui/menu.cpp | 13 ++++++------- runtime/ui_text.c | 2 +- runtime/ui_text.h | 2 +- runtime/vk_hdr.c | 2 +- tools/menu_preview.cpp | 2 +- 9 files changed, 19 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 84d28456..2478798f 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Report problems as issues, following [CONTRIBUTING.md](CONTRIBUTING.md). bars stay clean. The frame limit counts the frames the game draws, and frame generation adds its frames on top of it. The frame limit can also be handed to RivaTuner Statistics Server -- HDR on HDR displays: the game's scene tone mapped to the display's peak, matched to the game's mid grey and tone, with true blacks; peak, game and HUD brightness in the menu +- HDR on HDR displays, two kinds: the game's scene tone mapped to the display's peak, matched to the game's mid grey and tone, with true blacks, or the game's own native HDR; peak, game and HUD brightness in the menu - The game's known shaders prepared when the game is built, and the pipelines met in play built again in the background at each start, so play rarely stops to compile them; a shader or pipeline met for the first time can still hold a frame, and a draw that must wait for its pipeline has it built on worker threads, never on the game's diff --git a/docs/README-BuildKit.md b/docs/README-BuildKit.md index 33525c4c..6df775cc 100644 --- a/docs/README-BuildKit.md +++ b/docs/README-BuildKit.md @@ -172,7 +172,7 @@ beside the game. FSR 3.1 on any card where `amd_fidelityfx_vk.dll` loads, FSR 4 on the Radeon cards AMD's FSR 4 libraries list it for), Frame generation (NVIDIA DLSS on RTX 40 and 50 cards, with a DLSS multiplier of 2x, or 3x and 4x on RTX 50 cards; FSR 3.1 on any card where it loads; it needs DLSS or FSR 3.1 - upscaling on; the frame limit counts the frames the game draws and the generated ones come on top), HDR (the game's picture tone mapped to your display, with its peak, game and HUD brightness; turn HDR on in Windows first) and the + upscaling on; the frame limit counts the frames the game draws and the generated ones come on top), HDR (the game's picture tone mapped to your display, or Native, the game's own HDR, with peak, game and HUD brightness; turn HDR on in Windows first) and the resolution. A setting that takes effect only when the game starts again says "after restart" once you change it, until you set it back, and the Restart button at the bottom then counts the settings waiting for it. - **Controls** in the menu has Button prompts: the game's own, or Xbox, PlayStation, Steam Deck or keyboard and mouse ones when diff --git a/nx2navi.ini.example b/nx2navi.ini.example index 73b08f80..803d4b2c 100644 --- a/nx2navi.ini.example +++ b/nx2navi.ini.example @@ -513,11 +513,11 @@ # take effect at once. # framegen_multiplier = 2 -# HDR output: hdr = 1 sends the picture as HDR10, the game's scene tone mapped to your display (needs HDR on in -# Windows, "Use HDR", or a Wayland compositor with colour management; without it the picture stays SDR, the game's own). -# The look is fixed; hdr_peak_nits is your display's peak, hdr_game_nits the picture's white (paper white, 203 is the -# HDR reference) and hdr_ui_nits the HUD's and the menu's. Everything applies at once. hdr = native shows the game's -# own HDR mode instead, which the game takes up at the next start. The settings of the look of earlier versions +# HDR output, two kinds (both need HDR on in Windows, "Use HDR", or a Wayland compositor with colour management; +# without it the picture stays SDR, the game's own): hdr = 1 sends the game's scene tone mapped to your display, one +# fixed look, and applies at once; hdr = native shows the game's own HDR mode, which the game takes up at the next +# start. hdr_peak_nits is your display's peak, hdr_game_nits the picture's white (paper white, 203 is the HDR +# reference) and hdr_ui_nits the HUD's and the menu's. The settings of the look of earlier versions # (hdr_tonemap, hdr_exposure, hdr_gamma and the rest) are read by nothing now and do no harm. # hdr = 0 # hdr_live = 0 leaves the HDR path out of a run that starts with hdr = 0, as before hdr followed the menu: switching diff --git a/runtime/cfg.c b/runtime/cfg.c index 5748008a..1c540747 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -187,8 +187,8 @@ static const CfgMeta metas[] = { {"COLOR_CONTRAST", "100", "70..150", LIVE}, {"COLOR_SATURATION", "100", "50..200", LIVE}, {"COLOR_GAMMA", "1", "0.8..1.2", LIVE}, // HDR output (vk_hdr.c): on and off apply at once (the HDR tonemap is spliced into the game's as shaders load - // whatever is set, vk_hdr_armed); native, a value only the file sets, is the game's own and is asked for once, at - // start (vk_hdr_needs_restart). HDR_LIVE = 0 leaves the HDR path out of a run that starts with HDR off. The look is + // whatever is set, vk_hdr_armed); native is the game's own and is asked for once, at start + // (vk_hdr_needs_restart). HDR_LIVE = 0 leaves the HDR path out of a run that starts with HDR off. The look is // fixed: only the three whites are settings. {"HDR", "0", "0|1|native", LIVE}, {"HDR_LIVE", "1", "0|1", RESTART}, {"HDR_PEAK_NITS", "1000", "400..10000", LIVE}, {"HDR_GAME_NITS", "203", "48..500", LIVE}, diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index 185ef662..f8ff5903 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -1003,14 +1003,13 @@ static const char *hdr_note(void) { return note; } -// HDR (vk_hdr.c): off or on, switched at once; on is the game's picture tone mapped to the display, one fixed look. The -// game's own HDR (native) is a value only the file sets: the row lists it only while the file does, so that it reads as -// what runs. The three brightness rows follow while HDR is on. +// HDR (vk_hdr.c), two kinds: the game's picture tone mapped to the display (1, one fixed look), switched on and off at +// once, or the game's own HDR (native), which the game takes up at its start. The three brightness rows follow while +// either is on. static void row_hdr(void) { static const char *const values[] = {"0", "1", "native"}; - const char *names[] = {menu_text(UI_MENU_FRAMEGEN_OFF), menu_text(UI_MENU_ON), menu_text(UI_MENU_HDR_NATIVE)}; - const int n = !strcmp(cfg_value("NX2NAVI_HDR"), "native") ? 3 : 2; - opt_choice_list("NX2NAVI_HDR", UI_MENU_HDR, values, names, n, UI_MENU_HDR_DESC, -1, hdr_note()); + const char *names[] = {menu_text(UI_MENU_FRAMEGEN_OFF), menu_text(UI_MENU_HDR_TONEMAPPED), menu_text(UI_MENU_HDR_NATIVE)}; + opt_choice_list("NX2NAVI_HDR", UI_MENU_HDR, values, names, 3, UI_MENU_HDR_DESC, -1, hdr_note()); if (!cfg_bool("NX2NAVI_HDR")) return; opt_slider("NX2NAVI_HDR_PEAK_NITS", UI_MENU_HDR_PEAK, 400, 10000, UI_MENU_HDR_PEAK_DESC, 50, "%.0f nits"); opt_slider("NX2NAVI_HDR_GAME_NITS", UI_MENU_HDR_GAME, 48, 500, UI_MENU_HDR_GAME_DESC, 1, "%.0f nits"); @@ -1861,7 +1860,7 @@ static void perf_picture(const MenuTarget *t, PerfPanel *p) { else snprintf(v[7], sizeof v[7], "%sp", r); } const char *hdr = cfg_value("NX2NAVI_HDR"); - snprintf(v[8], sizeof v[8], "%s", menu_text(!strcmp(hdr, "native") ? UI_MENU_HDR_NATIVE : cfg_bool("NX2NAVI_HDR") ? UI_MENU_ON : UI_MENU_FRAMEGEN_OFF)); + snprintf(v[8], sizeof v[8], "%s", menu_text(!strcmp(hdr, "native") ? UI_MENU_HDR_NATIVE : cfg_bool("NX2NAVI_HDR") ? UI_MENU_HDR_TONEMAPPED : UI_MENU_FRAMEGEN_OFF)); const char *fg = cfg_value("NX2NAVI_FRAMEGEN"); const bool fsr_fg = !strcmp(fg, "fsr3") && vk_ffx_framegen_available(); // set but not loadable: off snprintf(v[9], sizeof v[9], "%s", fsr_fg ? (vk_fg4_active() ? fg4_label() : "AMD FSR 3.1") diff --git a/runtime/ui_text.c b/runtime/ui_text.c index 6fe23853..8210df36 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -667,7 +667,7 @@ static const char *const text_en[UI_TEXT_COUNT] = { [UI_MENU_FRAMEGEN] = "Frame generation", [UI_MENU_FRAMEGEN_DESC] = "Adds generated frames for smoother motion. Needs DLSS or FSR 3.1.", [UI_MENU_FRAMEGEN_OFF] = "Off", - [UI_MENU_HDR_NATIVE] = "Native (the game's)", + [UI_MENU_HDR_TONEMAPPED] = "RenoDX", [UI_MENU_HDR_NATIVE] = "Native (the game's)", [UI_MENU_FRAMEGEN_NOTE] = "needs DLSS or FSR 3.1", [UI_MENU_FRAMEGEN_NEEDS] = "choose a DLSS or FSR 3.1 mode under Upscaling first", [UI_MENU_FRAMEGEN_NEEDS_FSR] = "choose an FSR 3.1 mode under Upscaling first", diff --git a/runtime/ui_text.h b/runtime/ui_text.h index 8d66d9a7..66e67606 100644 --- a/runtime/ui_text.h +++ b/runtime/ui_text.h @@ -311,7 +311,7 @@ typedef enum { // the settings menu's Picture rows for this game (ui/menu.cpp tab_screen): one upscaling choice (bilinear, FSR 1 // or a DLSS mode) and the picture's resolution UI_MENU_UPSCALING, UI_MENU_UPSCALING_DESC, UI_MENU_FRAMEGEN, UI_MENU_FRAMEGEN_DESC, - UI_MENU_FRAMEGEN_OFF, UI_MENU_FRAMEGEN_NOTE, UI_MENU_FRAMEGEN_NEEDS, UI_MENU_HDR_NATIVE, + UI_MENU_FRAMEGEN_OFF, UI_MENU_FRAMEGEN_NOTE, UI_MENU_FRAMEGEN_NEEDS, UI_MENU_HDR_TONEMAPPED, UI_MENU_HDR_NATIVE, UI_MENU_GAME_RES, UI_MENU_GAME_RES_DESC, UI_MENU_GAME_RES_NATIVE, // the same rows' texts on a GPU DLSS does not run on (not NVIDIA): the menu leaves DLSS out there UI_MENU_UPSCALING_DESC_FSR, UI_MENU_FRAMEGEN_DESC_FSR, UI_MENU_FRAMEGEN_NOTE_FSR, diff --git a/runtime/vk_hdr.c b/runtime/vk_hdr.c index 6063922d..402bea39 100644 --- a/runtime/vk_hdr.c +++ b/runtime/vk_hdr.c @@ -1,6 +1,6 @@ // HDR output (NX2NAVI_HDR=1): an HDR10 swapchain (Rec. 2020 primaries, PQ) and a game picture tone mapped to the // display's range, one fixed look (shaders/hdr_tonemap.frag says which). Settings: NX2NAVI_HDR, on and off following -// the menu during a run (vk_hdr_wanted), the game's own HDR (native, a value of the file only) from the start only; and +// the menu during a run (vk_hdr_wanted), the game's own HDR (native, the menu's other HDR) from the start only; and // the nits NX2NAVI_HDR_PEAK_NITS (the display's peak), NX2NAVI_HDR_GAME_NITS (the picture's white, "paper white") and // NX2NAVI_HDR_UI_NITS (the HUD's and this menu's white), read when the settings change (vk_hdr_support). With // NX2NAVI_HDR=0 the swapchain is SDR, the spliced tonemap gives the game's own SDR picture (vk_hdr_support, p0.w = -1) diff --git a/tools/menu_preview.cpp b/tools/menu_preview.cpp index 500cab6b..187de365 100644 --- a/tools/menu_preview.cpp +++ b/tools/menu_preview.cpp @@ -263,7 +263,7 @@ static void scene_overlay(float w, float h, float scale) { snprintf(p.picture[5], 64, "%s", menu_text(UI_MENU_ON)); snprintf(p.picture[6], 64, "21:9"); snprintf(p.picture[7], 64, "1440p"); - snprintf(p.picture[8], 64, "%s", menu_text(UI_MENU_ON)); + snprintf(p.picture[8], 64, "%s", menu_text(UI_MENU_HDR_TONEMAPPED)); snprintf(p.picture[9], 64, "%s", menu_text(UI_MENU_FRAMEGEN_OFF)); p.scene_known = false, p.fg_fps = 60, p.under_menu = false; perf_panel_draw(&p, w, scale);