emoose / OutRun2006Tweaks

Turning and spinning and spinning and turning, woah!
MIT License
308 stars 0 forks source link

[Feature Request]: HDR support #127

Open emoose opened 2 weeks ago

emoose commented 2 weeks ago

Describe the feature you'd like to see added

A way to add HDR support to the game would be great, don't think there's much we can do on the game side though since it uses D3D9 which doesn't support any HDR, but there are DXVK forks which can retrofit it.

Haven't really been able to find much info about the best way to set that up yet though (the info about HDR retrofitting is really scattered around the net it seems, AFAIK you need both DXVK + reshade setup to handle it)

If anyone got HDR working well with the game please let us know your setup!

Alternatively I think NVIDIA's RTX HDR works with the game too, but that probably wouldn't be as good as actual HDR retrofit.

SoftwareTester45 commented 2 weeks ago

You can inject HDR via Windows AutoHDR or, for more control, via Nvidia Settings.

Outrunner24 commented 1 week ago

it uses D3D9 which doesn't support any HDR

Well, a few older games like Test Drive Unlimited (on PC) had HDR support in DirectX9 so it can be done. That said, can't you tweak a few shaders to make environment light stand out more? For example, coming out of tunnels etc.

Right now, it's hard to even catch the sun rays at the start of the race.

Tenome commented 5 days ago

For DX9, I think you can use dgvoodoo to translate it to DX11 and then inject HDR from there. Though I think DXVK covers DX9 anyway, so nevermind.

emoose commented 4 days ago

Figured out a pretty good setup, with HDR1000 screen the game pretty much lights up my whole room now lol.

d3d9.enableRenderTargetUpgrades           = true
d3d9.upgrade_RGBA8_UNORM_renderTargetTo   = rgba16_sfloat
d3d9.upgrade_RGBX8_UNORM_renderTargetTo   = rgba16_sfloat
d3d9.upgrade_BGRA8_UNORM_renderTargetTo   = rgba16_sfloat
d3d9.upgrade_BGRX8_UNORM_renderTargetTo   = rgba16_sfloat
d3d9.upgrade_RGB10A2_UNORM_renderTargetTo = rgba16_sfloat
d3d9.upgrade_BGR10A2_UNORM_renderTargetTo = rgba16_sfloat
d3d9.upgrade_RGBA16_UNORM_renderTargetTo  = rgba32_sfloat
d3d9.enableBackBufferUpgrade              = true
d3d9.upgradeBackBufferTo                  = rgba16_sfloat
d3d9.enableSwapChainUpgrade               = true
d3d9.upgradeSwapChainFormatTo             = rgba16_sfloat
d3d9.upgradeSwapChainColorSpaceTo         = scRGB

If it's setup properly, when you run the game it should switch to fullscreen and appear very dim compared to the normal C2C.

To get the HDR effect you need to open ReShade menu with Home key, then enable Lilium's inverse tone mapping, once it's enabled it should make the HDR appear properly, you can tune the max brightness to your screens nits in the settings panel at the bottom.

For me this works pretty well, only issue I've noticed is some water reflections have part of it not rendering properly, think removing one of the lines from dxvk.conf can fix that though, will update if I find something for it. (also I'm not sure if DXVK supports TransparencySupersampling, might need to force that in GPU control panel instead)