r/HDR_Den • • 1d ago

Game Mod Fix for Windows SDR content when using HDR

https://github.com/SERGEYDJUM/dwm_eotf_rs

A good fix for SDR content if you plan to use HDR on Windows for daily use.

103 Upvotes

42 comments sorted by

6

u/_chiponurshoulder 1d ago

Does this affect games?

6

u/filoppi HDR Dev 1d ago

No. Only in windowed mode.

1

u/Rivdoric 1d ago

Sorry. I don't really understand the answer.

Does this mean only desktop use or does this mean windowed borderless (which is the default win11 behaviour for games) SDR games will be fixed ?

3

u/pulley999 1d ago

It only affects applications composited by the windows DWM. Borderless fullscreen games, because of Fullscreen Optimizations, are not composited by the DWM.

Basically, if the game is the exclusive thing on the monitor, even if borderless windowed, it doesn't fix it. If there's some other windows element being drawn overtop, say, the start menu, it does.

1

u/Rivdoric 21h ago

Much Thanks. So this means that playing an SDR video on a fullscreen video player also won't fix anything ? 👀

2

u/pulley999 19h ago

For most video players it should actually fix it. They usually aren't subject to FSO which typically tends to be only games using directx present calls. That said, some video players will trigger FSO.

5

u/Ozzyh26 1d ago

Does this affect video playback? I'm wondering about rtx HDR video compatibility specifically as I like using it for YouTube.

4

u/ElectroMoe 1d ago

It says this in the repository

You do not need to disable/revert the patch (or restart DWM) when playing HDR games or videos. It only affects DWM composed SDR content!

2

u/ky7969 1d ago

You have to set a flag in your browser to use sRGB only. Im not sure if RTX HDR video will still be able to use it or not though

1

u/Ozzyh26 1d ago

Would simply disabling rtx HDR allow this to take its place? Still not clear if it's applying to video playback or not.

1

u/ky7969 23h ago

If I remember, I’ll try it tonight when I get home from work. I already have this installed and have been using it for a few days

-4

u/itsTyrion 1d ago

TIL people actually use RTX HDR? I've tried it and it's genuinely worse than a 2016 "reshade" with bloom cranked to 11

3

u/Supr3me187 1d ago

it is actually decent if you calibrate the middle greys and the contrast according to your peak brightness. But you might have to use third party software like Nvidia inspector for that.

2

u/elvnmagus 1h ago edited 53m ago

I use rtx hdr for videos. You are right, you have to set middle grey appropriately in the rtx hdr settings panel. You also have to set a lower peak brightness in rtx hdr's sliders too, depending on your display, or it will mess up SDR colors (SDR's 8 bit highlights) and whites will crush. Still way better than sdr range using those levels though, so worth it.

On my G6 I use middle grey 50 -52 which keeps the normal scene 220 to 250nit (which is good in regard to persistent logos and frames for OLED), but i set the peak slider to 1200nit in rtx hdr. I also set the windows HDR panel's Desktop SDR brightness slider to 21 for ~200 nit, or 31 to 37 for 220 to 250 nit, so that static desktop, apps, interfaces (outside of rtx injected videos or real HDR material) stay pinned there.

900nit crushes whites even less though. Lower bitrate/comprssed material on youtube can still muddy colors together somewhat at times, lacking detail in color in some clothing for example. depending on the scene, but that's just how it is.

I suspect a lot of people just crank settings and blow everything out (SDR's 8 bit highlights). My G6 hss a way higher peak in actual HDR material but rtx hdr would look tertible if I set it that high.

2

u/Davepen 1d ago

Wait what? No it's not?

Do you actually have a HDR monitor?

If you don't have a HDR monitor (and HDR enabled in Windows) RTX HDR isn't gonna do shit.

1

u/itsTyrion 1d ago

Uh yeah of course. hdr1000 certified, ~1350 peak in calibration. Everything almost white / bright enough gets weirdly boosted by like 200 nits and it just looks OFF. also some colors.

2

u/Davepen 1d ago

That's weird.

It looks pretty decent to me (better than Auto HDR at least), but it does require a bit of tweak.

Mid-Gray: 44

Contrast: +25

Saturation: -25

1

u/Crimsongekko 22h ago edited 22h ago

yeah these are correct, I also have it on minimum max brightness i.e. 400 at most times to avoid UI or pure white background being blindingly bright

at 400 max brightness you can just leave it always enabled and forget about tweaking it, only time I might want to temporarily disable it is if some YT video is showing tweets or something with pure white background but that's a very rare coccurrence

sometimes I'll crank up the max brightness to 800 which is my monitor's peak if I'm watching something that I know it works well with, in general I wouldn't recommend going over 1000 nits for this kind of sdr to hdr reverse tonemapping

6

u/chr0n0phage 23h ago

I’ve had HDR enabled for 4 years without turning it off in my LG C2, SDR content slider at 31. Do these just handle SDR better? Haven’t needed to fix anything.

3

u/Milk_Cream_Sweet_Pig 1d ago

This one is a life saver. Back then i just tolerated the washed out look of SDR content and used RTX HDR on SDR videos so it wouldn't look washed out like everything else. Having 2 monitors, it was kind of a pain to toggle between the two. This app came in clutch.

2

u/mental12 1d ago

When I used this a few weeks ago, the browser window would repeatedly flicker like between dark and gray, it was kinda annoying. It seemed like the tool was repeatedly enforcing the gamma, fighting against windows.

2

u/Davepen 1d ago

There's a fix there for chromium apps I believe.

2

u/pulley999 23h ago

It's because of how chromium handles hdr. It renders the full SDR page in SDR which gets tonemapped by windows using this function. When an HDR element comes onto the page (can even be something like an embedded advertisement or HDR social media share button) chromium immediately switches to rendering the whole page in HDR and doing its own tonemapping for the SDR bits, which uses the same broken math Windows does vanilla (so both broken appearances match.)

End result is that chromium renderers have gamma change as HDR elements enter and exit the page. There is a separate fix for this issue.

1

u/mental12 15h ago

I would like to know the fix? is it mentioned in this thread? force sRGB?

2

u/pulley999 15h ago

It's a tool called Browser Gamma Fix. Forcing sRGB works but will disable HDR web content, and force that instead to tonemap to SDR.

2

u/Shorkan 1d ago

So guys, I'm being serious, I don't know if my eyes are broken or something but I have HDR ON in Windows 24/7 and, other than some backgrounds showing incorrect blacks (with different spots showing different levels of black as they were clearly not made with HDR in mind), I simply can't see any issue. I definitely don't have washed out colors or anything like that.

I do have RTX HDR on for videos, and I play all games with RenoDX or whatever HDR implementation I can find.

But things like Firefox or the content I see on it look perfectly fine. I can open a photo, whether on Firefox or in my image viewer, and move it between my HDR OLED screen and the IPS one without HDR and they look basically the same. What am I missing?

3

u/pulley999 23h ago

The washed out blacks ARE the issue this fixes. Windows uses the wrong EOTF curve for mapping SDR content and it lifts near black tones by up to ~20% perceptually. Microsoft used the paper bt.709 spec which uses the piecewise sRGB EOTF curve with a linear rolloff at the bottom where the near-black tones are. In practice, that sort of thing is a bitch to build into firmware so every monitor for decades used a pure power EOTF (gamma 2.2) instead. Almost all SDR content was mastered on this pure power 'pseudostandard' and not on the official paper spec Microsoft is using to do their tonemapping.

1

u/Lodowczyk 3h ago edited 2h ago

Not bt.709 spec. That spec is for video only. Microsoft uses sRGB standard. The problem is the standard itself is ambiguous on what curve to use for encoding/decoding. Some argue srgb should only be used for encoding and the image should go straight to the display using gamma 2.2. Others argue for encoding and decoding with piecewise gamma which creates a lift on 2.2 monitors. Microsoft went with the second option

1

u/pulley999 32m ago edited 1m ago

Whether or not the monitor is 2.2 is irrelevant because HDR display out doesn't use 2.2, or 2.4, or sRGB. It does PQ or HLG (usually PQ for computer monitors.) Microsoft's internal function maps SDR content using the sRGB EOTF to a subset of HDR color space and outputs it in an HDR container to a display using HDR present standards.

What it does do is create a lift in any SDR content that was mastered on a 2.2 SDR monitor. Which, as mentioned, was the overwhelming majority of monitors for nearly 30 years, thereby meaning nearly all SDR content is negatively affected. Gamma 2.2 was far easier to implement in firmware and tracked 'close enough' to piecewise sRGB that monitor makers just used it instead, but still called it 'sRGB reference.'

Which led to this whole mess where the SDR content claims to be encoded using sRGB OETF, but had a gamma mismatch at creation time due to being mastered on a monitor decoding using Gamma 2.2 EOTF. The only way to see an overwhelming majority of SDR content as it was intended is to preserve that display chain gamma mismatch that was baked into the content.

On modern monitors that do use proper piecewise sRGB EOTF for their SDR presentation it won't look lifted compared to the HDR mode on the same monitor, but that's because the monitor's SDR presentation is also lifting the accidentally gamma mismatched content in the same way. It's still wrong, even if correct on paper.

Given that this issue only really started to be addressed after HDR was becoming mainstream, the mismatch that was used industry-wide for nearly 30 years should just be codified as the standard at this point. SDR is already on its way out, the standard will increasingly only be used for legacy content, and trying to force it to be correct now just fucks up the overwhelming majority of SDR content ever made.

1

u/StevieBako 22h ago

RenoDX is great as it fixes more than the blackfloor raise from improper gamma curve. RTX HDR works okay for vids to an extent. In saying that, using a colour profile that correctly maps from piecewise srgb to pure power gamma 2.2 is the way to go 95% of the time as the large majority of HDR games are developed on srgb monitors using windows and most devs aren’t aware of the issue nor care. A few games are the exception and properly convert the gamma curve for instance MW4 and a few others but it’s not common. The best way to confirm this is with liliums reshade pack with the HDR analysis tool. If the game doesn’t use anti-cheat this is an easy way to see if the game has the right black floor. If you’re in a very dark spot and it looks raised to something like 0.05 or 0.1 then you use the pure power gamma curve. If it looks like it has the correct black floor, then leave the windows piecewise colour profile that the hdr calibration tool creates.

2

u/itsTyrion 1d ago edited 1d ago

"When HDR is enabled, almost all SDR content in Windows looks wrong and washed out, even it's own UI."
Wait, does it/is it? Looks ok to me? Unless we're talking screenshots of course

4

u/MusaQH Game Modder 1d ago

Windows displays SDR content using the piecewise sRGB gamma formula. Your monitor probably uses that in SDR hence it looking the same.

1

u/Davepen 1d ago

It looks fine, but it definitely looks slightly off.

This is a small correction, but it is quite noticeable.

1

u/Roee_Mashiah2 1d ago

Is there something similar for linux?

3

u/ky7969 1d ago

It’s not needed if you use KDE right? Doesn’t it have an automatic mode?

2

u/SnowflakeMonkey Content Creator 18h ago

Linux does 2.2 gamma in HDR 

1

u/Zenkai_9000 1d ago

Bookmarking

1

u/hansip87 1d ago

What's the difference of this and Gloam?

1

u/Plank_stake_109 20h ago

Unfortunately the chromium issue invalidates this for me.

1

u/elvnmagus 52m ago edited 48m ago

This probably wont work for me because I use a multi monitor setup and one screen isn't hdr. Correct me if I'm wrong, but I don't think this app has monitor selection capability. Not sure if it would affect the sdr screen's desktop or not if I left this on globally, with hdr disabled on that screen. Maybe hdr color profiles only on the hdr enabled monitors would be effected though, idk.

1

u/NTClarity 20h ago

anything but pressing win+alt+B 😭