Advertisement

HDR10 programming for Windows

Started by July 30, 2019 04:13 PM
4 comments, last by Hodgman 5 years, 6 months ago

I googled about HDR support for consumer video cards but I learned that Nvidia/AMD blocked 10-bit color access from OpenGL programming for windowed mode but only support DirectX for 10-bit color depth in both windowd and full screen.  However, they support 10-bit color depth for Linux and Mac fully.

Does anyone have any successful implementation for windowed OpenGL mode by using buffered RGB10A2 mode? Or have we to use only full-screen OpenGL mode for HDR10 programming?

Neither block for OpenGl apps anymore. AMD hasn't for a long, long time, and Nvidia finally cracked like a week or two ago and delivered open driver support for it as well.

Advertisement
On 7/31/2019 at 2:13 AM, Sword7 said:

I learned that Nvidia/AMD blocked 10-bit color access from OpenGL programming for windowed mode but only support DirectX for 10-bit color depth in both windowd and full screen

10bit color support was officially added way back in D3D9 as a way to display "wide color gamut"... but it was all fairly poorly defined and not well specified (just like GL ?). e.g. does the buffer contain Rec.709 RGB primaries or Rec.2020 RGB primaries? Does it use sRGB transfer functions, Rec.709, PQ??? (Well, PQ and 2020 weren't invented yet, so this is obviously rhetorical now...)
I wouldn't be surprised if most drivers just silently convert it down to 8-bit behind the scenes...

With D3D on Windows 10, you can finally make a 10bit back-buffer reliably and use new DXGI API's to attach precise metadata about how it's encoded (e.g. HDR10 PQ Rec.2020 RGB). You can also make a 16-bit back-buffer and output linear scRGB data, which is a lot easier, and let the driver do the conversion to HDR10 :D
With D3D, you can also use the extensions from each vendor (NVAPI and AMD AGS) to achieve the same as the above, without using the new DXGI API's.

Seeing that DXGI isn't too applicable to GL, I would guess that you'd be stuck looking for vendor-specific extensions from AMD/NV/etc on how to display HDR10 data...
Alternatively, you could use one of the "D3D interop" extensions, where you do all of your rendering in GL, but then share the final image with a D3D device and have it display it to the screen... :( 

 

That said... As for windowed vs full-screen... On windows, unless you're on Windows 10 and the user has opted in to display their desktop in HDR10 (unlikely), then you really have to use a full-screen mode to display your game in HDR10. Windowed modes might "work" but definitely won't be delivering a real HDR signal to the monitor...

Good news! I now found it when I googled. NVIDIA recently released new driver for Windows now support 10-bit color fully.   

https://petapixel.com/2019/07/29/nvidia-unveils-new-studio-driver-with-support-for-10-bit-color-for-creatives/

1 hour ago, Sword7 said:

Good news! I now found it when I googled. NVIDIA recently released new driver for Windows now support 10-bit color fully.   

https://petapixel.com/2019/07/29/nvidia-unveils-new-studio-driver-with-support-for-10-bit-color-for-creatives/

Keep in mind that support for "10bit color" / "30 bit color" is completely different to support for HDR10.

10bit (or 30bit) is a standard RGB format, but with "deep color". Basically just 8bit sRGB but with improved color precision (less banding).

HDR10 uses different wavelengths of red/green/blue to represent a larger gamut, uses a completely different "gamma" function, and has an extended brightness range.

This topic is closed to new replies.

Advertisement