1
$\begingroup$

I understand that HDR files are images encoded with a higher precision in order to keep more details.
When loading such images in real-time rendering applications using common Graphics APIs (DirectX, OpenGL, Vulkan), which are the "HDR texture formats" that ensure details will be preserved?

$\endgroup$
3
  • $\begingroup$ Are you talking about the texel formats the GPU understands, or are you talking about the file formats that images are stored in before texture upload? $\endgroup$
    – Dan Hulme
    Nov 6, 2018 at 9:20
  • $\begingroup$ About the former $\endgroup$
    – wip
    Nov 6, 2018 at 13:03
  • $\begingroup$ But connecting those with details about how the data is arranged in the image files would be interesting as well Dan. $\endgroup$
    – wip
    Nov 6, 2018 at 13:05

2 Answers 2

3
$\begingroup$

In general, using floating point textures will help preserve HDR values. They can be 16-bit or 32-bit floats for the color channels, usually. In OpenGL you could choose the type to be GL_FLOAT for 32-bits per channel or GL_HALF_FLOAT for 16-bits per channel. In my experience, for image processing, 16-bits is usually enough and is half as much data.

$\endgroup$
4
$\begingroup$

Also consider these alternatives for reducing bandwidth in comparison to R16G16B16A16.

DXGI_FORMAT_BC6H_UF16 is block compressed fp16 (half) RGB.

https://docs.microsoft.com/en-us/windows/desktop/direct3d11/bc6h-format

DXGI_FORMAT_R11G11B10 unsigned small float

https://bartwronski.com/2017/04/02/small-float-formats-r11g11b10f-precision/

Common image file formats for HDR are exrs or dds. They're pretty trivially encoded as 32-bit or 16-bit per channel floats.

$\endgroup$
1
  • $\begingroup$ Thanks for the complementary info and for the link to an interesting blog post $\endgroup$
    – wip
    Nov 18, 2018 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.