emoose / DLSSTweaks

Tweak DLL for NVIDIA DLSS, force DLAA on DLSS-supported titles, tweak scaling ratios & DLSS 3.1 presets, override DLSS versions without overwriting game files.
MIT License
1.31k stars 21 forks source link

NvTrueHDR - RTX HDR in games (testers needed!) #120

Open emoose opened 9 months ago

emoose commented 9 months ago

Noticed that nvapi64 exposed some TrueHDR profile settings a couple drivers ago but they never seemed to have any effect, when 551.23 released I did see the driver DLLs were trying to read from them now though, but settings still didn't seem to do much...

Digging around in the driver it turned out there were some other undocumented settings it needed enabled too, with those set it seems to activate fine 😺

Posted a tool that can set up the settings for you here: https://www.nexusmods.com/site/mods/781

Sadly haven't found a good way to take screenshots of the RTX HDR yet, but to me it seems to give slightly darker results than Windows AutoHDR, maybe preferable to some.

Only really tested this on my own system so far, would be interested in hearing any feedback from anyone who tries it!

CeIIHunter commented 9 months ago

Can't seem to get this working at all. Both with the tool and via NVProfileInpsector with your XML. I tried with Fortnite DX12, Dolphin Emulator DX12, and Yuzu VK with the DXGI Swapchain setting enabled. What does the HUD element look like? Also does NVCP show it as active because that is a good way to check if it's working for videos it changes live.

CeIIHunter commented 9 months ago

After a DDU it works finally. I have no clue what caused it to break since I had default NVCP settings

Artins90 commented 9 months ago

On my system it doesn't find the profiles, even if I run it as administrator:

image
emoose commented 9 months ago

Hm, maybe try using the full path for the EXE, might be needed for profiles added in NVCP.

If it still doesn't work try using NV inspector with the XML on nexusmods.

@CeIIHunter I had same issue when trying to work out how to enable it, almost thought it was just broken & gave up on it till I did a clean install lol, glad you could get it working.

Not sure which NVCP settings might be interfering with it, think I did have DXGI swapchain setting changed too, maybe that's the cause?

Artins90 commented 9 months ago

Adding the entire path worked, I did a quick test and it looked great. It's worth considering that it has a performance cost, with my 3080 Ti standing in the exact same spot and pointing at the same door on a building, I measured 54 fps with TrueHDR enabled vs 58 with it it disabled (6,89% performance loss).

CeIIHunter commented 9 months ago

@Artins90 I imagine this game is using RT and or DLSS? I believe Nvidia's HDR uses tensor cores so if a game doesn't make use of those cores there shouldn't be performance loss? Also yeah it looks great when compared to AutoHDR, a little dimmer than I'd like, but it seems like it uses a wider color gamut more appropriately.

CeIIHunter commented 9 months ago

Also @emoose I don't know if the DXGI swapchain causes it. I reenabled it after getting it working and it seems to function still. I'll update if it breaks after a reboot or something.

Artins90 commented 9 months ago

@Artins90 I imagine this game is using RT and or DLSS? I believe Nvidia's HDR uses tensor cores so if a game doesn't make use of those cores there shouldn't be performance loss?

It's Granblue Fantasy: Relink, it doesn't support DLSS nor raytracing. Power usage definitely goes up considerably even when watching videos with RTX HDR, but I have no idea whether RTX HDR uses tensor cores or not.

McHox commented 9 months ago

just can't get it to work on any game i try. win10, latest driver fresh after ddu, aw3423dw. tried disabling all overlays(steam, nv, rtss) but nothing

McHox commented 9 months ago

doom 2016 with vk is the only one that sorta worked so far, but performance is horrific at around 2100ms per frame, starting it with opengl just doesn't do anything like with other games

emoose commented 9 months ago

I posted a quick TrueHDRTweaks tool at https://www.nexusmods.com/site/mods/781?tab=files to let you tweak some of the hardcoded values, haven't been able to figure out what they all are yet though, if anyone feels brave feel free to give it a try.

just can't get it to work on any game i try. win10, latest driver fresh after ddu, aw3423dw. tried disabling all overlays(steam, nv, rtss) but nothing

Not really sure if it works on win10 unfortunately, seen a couple win10 users mention it not working at least... are there any Win10 users here that have it working?

E: yeah looks like the driver is checking for WDDM 3.1 for some reason, not sure if Win10 ever included that, might be Win11 only :/

Filoppi commented 9 months ago

I have tested all values exposed by your ASI loader and written down what they do. Paper white multiplier is Value5 and it defaults to ~203 nits, which is more appropriate than what AutoHDR default to at its minimum brightness (~300 nits or so, too bright for a dark room). These are my suggested defaults, and they don't shift colors!

[Values]
# Value0 = Gamma? Seems like it's not a raw gamma formula but more of an indicator than pure gamma as it doesn't shift colors much, just their luminance. There's no way to set it to sRGB. 2.2 is the way to go for nearly all games
Value0 = 2.2
# Value1 = It doesn't seem to have no effect right now. It's not paper white or mid gray scaling nits.
Value1 = 150
# Value2 = Contrast: higher is more contrast, leave at 1 for original/neutral contrast)
Value2 = 1
# Value3 = The strength of the HDR highlights curve? Though it also seems to affect the average brightness and possibly shifts colors a bit (at least on negative values). Leave at 1 or more.
Value3 = 1.3
# Value4 = Saturation: higher is more saturation, leave at 1 for original/neutral saturation. This is no "smart" gamut expansion, it seems to shifts all colors equally
Value4 = 1
# Value5 = Paper white multiplier, expressed in an unknown format (it can go beyond 100, maybe 50 is neutral and 100 is 2x, 150 is 3x...). Supposedly it uses mid gray as scaling pivot. At 50 it's roughly 200 nits (or 203!), matching a Windows SDR->HDR brightness slider value of ~30. At 0 it's pitch black. Suggested value is 50, but it's based on preference
Value5 = 50
# Value6 = Peak Brightness in nits: suggested range is 750 to 1000 (or the peak brightness of your display anyway). Don't set this lower than ~400
Value6 = 1000
# Value7 = Doesn't seem to affect the image, it could be some internal parameter, like how many zones it divides the image in for analysys, or the LUT resolution
Value7 = 64.0
# Value8 = Doesn't seem to affect the image, it could be the quality of the HDR effect?
Value8 = 5
Nd4spdvn commented 9 months ago

Is it possible to expose the tweaks of TrueHDRTweaks tool for videos as well -normal RTX HDR Video? Would be great to control how youtube and other streaming videos in browser will look! Oh, and this works beautifully in games particularly after the tweaks, many, many thanks!

CeIIHunter commented 9 months ago

So I can't figure out why but with Vulkan FPS either dies or it works it seems inconsistent for me for some reason. Have not gotten it working in OGL at all yet.

emoose commented 9 months ago

Is it possible to expose the tweaks of TrueHDRTweaks tool for videos as well -normal RTX HDR Video? Would be great to control how youtube and other streaming videos in browser will look! Oh, and this works beautifully in games particularly after the tweaks, many, many thanks!

v0.5 of the tweaks seems to apply to MPC-HC fine with the RTX video renderer, haven't tried it in browsers at all though, would guess the ASI loader might be able to load it into them but wouldn't be surprised if something might break it, if anyone tries it let us know how it went.

(0.5 also added a bunch of extra unidentified settings, one of them seems to have a pretty big effect on FPS, feel free to give them a try)

LeoKlaus commented 9 months ago

@CeIIHunter Have you gotten NvTrueHDR to work with Yuzu? Switching to the DXGI swapchain is fine but as soon as I enable any profile for Yuzu, performance tanks to 0-1FPS (Mario Kart 8). Auto HDR works with the renaming to cemu hack, but I really don't like how it looks.

CeIIHunter commented 9 months ago

@CeIIHunter Have you gotten NvTrueHDR to work with Yuzu? Switching to the DXGI swapchain is fine but as soon as I enable any profile for Yuzu, performance tanks to 0-1FPS (Mario Kart 8). Auto HDR works with the renaming to cemu hack, but I really don't like how it looks.

Nope never got it working. But we got the new driver update and nvidia app that lets you enable it. That'll probably work but currently it only supports one monitor. The NVTrueRTX still works with dual monitors so I'm still forcing it that way lmao. Thanks nvidia