AutoHDR-ReShade icon indicating copy to clipboard operation
AutoHDR-ReShade copied to clipboard

MSAA and sRGB Gotchas

Open Kaldaien opened this issue 2 years ago • 1 comments

First, let me say, thank you. My own software has been doing HDR and Flip Model overrides for 4-5 years now, but there hasn't been any alternative software to do the same.

There is value in your AddOn in two key areas, obviously the HDR, but the Flip Model upgrade alone is great for windowed mode frame pacing, latency and in fact, using -actual- Windows AutoHDR (Flip is a pre-requisite).

I have no major criticism on the HDR implementation, aside from you may get better results using scRGB in an FP16 SwapChain.

Where I'd like to bring attention are a few caveats that will prevent the Flip Model upgrade you are trying to perform here from working:

  1. MSAA needs to be stripped from the SwapChain and resolve done elsewhere
  2. sRGB needs to be stripped from the SwapChain, you're better off in HDR if you remove the sRGB curve inside your tonemap shader than using sRGB Shader Resource Views

The reason you'd want to do the sRGB curve removal manually is because, if you opt to use scRGB (and I highly suggest it when taking SDR content and making it HDR), your backbuffer is going to be FP16 and there is no way to get an sRGB view of an FP16 buffer.

Flip Model also does not support multiple SwapChains per-HWND, so in practice some games (i.e. Cross Code) will require you to recycle old SwapChains.

Leaving this here as a list of things you could improve, since a general purpose Flip Model AddOn using ReShade is HUGELY significant. I spent years on this and thought nobody was ever going to come up with an alternate implementation :) I'd really encourage if you've got the time to polish off the corners.

Kaldaien avatar Jun 17 '22 15:06 Kaldaien

Good morning Kaldaien! Firstly thanks for your detailed description and well done with SpecialK it's an amazing piece of software.

Yes you're right I should probably support for 16bit back buffers and I should probably handle MSAA back buffers more gracefully too. I shall definitely do this.

This started off by adding HDR support to RetroArch to allow me to utilize HDR for CRT shaders - a crucial step in my opinion to simulating those old screens as they get super bright. I then wanted to port my Sony Megatron shader over to Reshade but didn't have HDR support built in so this is how this add-on materialised.

Right now I'm very busy on another add-on but I will find some time to add these features as it shouldn't take long.

MajorPainTheCactus avatar Jun 19 '22 08:06 MajorPainTheCactus