Major update to the HDR system of RetroArch #18616
Merged
+3,463
−1,387
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The advent of the latest monitors and TVs shown at CES—such as Nvidia's G-SYNC Pulsar, TCL's X11L 9000-nit TV, Samsung's RGB V-Stripe QD-OLED displays, and LG's RGB Stripe OLED displays—means we'll be able to more accurately simulate CRT displays this year. Consequently, I thought a long-overdue revisit of RetroArch's HDR system was necessary in preparation.
This is a major upgrade to the HDR system. Firstly, it changes the inverse tone mapping in two major ways:
I've also made a number of changes to the D3D11, D3D12, and Vulkan drivers, making HDR more of a first-class citizen (don't worry, SDR is just as it's always been). Now, it is not done as a post-processing step; instead, it is done when we copy the emulation output to the screen. This both speeds up HDR and reduces GPU memory usage.
I've also exposed all the HDR menu settings to the custom shaders. There is no longer a set of menu options and conflicting shader options confusing users. Custom shaders will need to be updated to take advantage of this—hopefully, this will mean stuff just works for the end user.
I've also added a scanline simulation for HDR, as this is the main reason you want to turn on HDR for end users of RetroArch. This simulation is aimed at getting HDR scanline simulation working on a Raspberry Pi 5 at 4K, so it's incredibly fast and is all done in a single pass tied in with the HDR. It has a single option: the sub-pixel layout of your TV; everything else is fixed. Obviously, for more options, all the custom shaders we know and love are still there. This is an HDR-only scanline simulation that will turn itself off if any shaders are selected (you can turn it back on once a specific custom shader has been loaded, for example, if it's just a colour grading shader).
All in all, this should prove to be a big change for end users, mainly from the simplicity and quality perspectives. HDR should 'just work' out of the box for the majority of users, with tweaks only really needed on displays that claim to be HDR but aren't truly capable.