-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native HDR Output #698
Comments
Since change most-likely will affect the engine, can you please provide api proposal on how swapchain should be created now? Afaik in Metal it's as simple as setting In Vulkan, there is |
Also renamed this issue to "Native HDR", for clarity sake |
Just a collection of knowledge so far:
So the plan is game internal -> 16bit scRGB & apply UI (& dither)-> 10bit BT.2020 for output This makes it much easier, since i feared there would be many competing HDR outputs & devices to support. But that's not the case. However a 16bpc texture would be needed to support scRGB. This also leaves a black box for the "game internal" color space, which i still need to figure out properly. Edit 1: color.org specs maybe outdated, need to find current ones when it comes to format implementation |
It's questionable whether you really want to tack that last bit onto things. Transforming from scRGB to the display's wire-format (ST.2084 + BT.2020, at 10-bpc) is something the driver can do for you with zero assistance. If you leave the output in FP16 scRGB, then the driver can leverage its own dithering and third-party overlays and post-processing done to your game can be performed in a more friendly color space. I strongly believe that encoding for HDR10 manually when you're already in scRGB is an anti-pattern. scRGB's a good universal HDR container and you can leave quantization to HDR10 to the OS to handle and that's a perfectly valid solution. HDR10 as SwapChain output only really sees practical application with DLSS3 Frame Generation. NVIDIA refuses to accept an scRGB input for motion flow because 16-bpc FP is too taxing on the GPU's hardware to get frame generation performance benefits. |
Some additional infos regarding platforms: Windows: Vulkan HDR only works when the swapchain is exchanged for a dxgi swapchain. See here: dxgi-swapchain-on-opengl-and-vulkan.
and regarding how to do it the modern way:
For DX12/DXGI we can find some docs here: HDR in DX12 Linux is a little tricky, with no official HDR support but working support in gamescope. Direct Render Manager needs to be used. I would say for now, Linux HDR implementation is an optional feature, we better focus on Windows and Mac. |
This doesn't seem to be relevant to application: DXGI-swapchain is something what driver implementation detail, AFAIK vulkan application has no say about it.
I'm fine with keeping it optional - we likely have to expose 'caps' anyway in device-properties and have 2 paths in game-rendering. However Vulkan extension seem to generic - maybe it will "just work" on linux? |
General Issue
Currently the game output is tailored towards 8-bit sRGB format. It would be nice to support higher bit-depth output devices and wider color spaces.
To-Do
(under construction / subject to change)
The text was updated successfully, but these errors were encountered: