We’ve encountered a problem with trying to store the full range of a render to an EXR file.
The rendertexture format is set to ARGBFloat, and the Texture2d format is set to RGBAFloat. The camera has dithering turned off, and tonemapping is also turned off.
Even using the recorder results in the same non-full hdr EXR file.
Yet the resulting image is not storing all the data needed for full HDR.
Opening the file in photoshop and adjusting the exposure there reveals the data stored has an exposure range between -6 and +6. Anything beyond this would be like adjusting brightness, just going towards white or going towards black.
Here’s a test scene with a midpoint set to 9, basically exposure set in unity to 9.
As you can see there’s enough data in the EXR to set exposure to the sun, but if we go further than -6 it shows we don’t have more data than that. Here’s with exposure in photoshop set to -8, out of HDR it seems.
This is not how it’s supposed to look. It’s all washed out and lacking data, as if we’ve run out of dynamic range or something. Highlights and the sun are no longer bright, they are simply being dimmed.
This is how it’s supposed to look at -8.
Did you check that the color buffer format in your active HDRP asset is set to r16g16b16a16 ? (also worth checking in the post processing buffer format)
This difference might explain some clamping in the stored data.
Hmmm, I think that setting is bugged somehow. It doesn’t matter what I set it to.
I’ve tried exporting EXR files with the R11G11B10 and the R16G16B16 and it’s makes no difference in the dynamic range of the image.
Seems like an aweful workaround IMO, that would require rendering several times and merging the results. We shouldn’t have to do that considering the engine deals with a bunch of 32bit and 16bit buffers.
We’re technically supposed to get the full 16bit range, but for some reason we’re truncated to R11G11B10 regardless of what we’ve set in the HDRP asset.
A few forum posts (two to be exact) have asked about this as well, but only one managed to find a solution. The solution was to set up a way to fetch the render results before post processing.
Why can’t we render out HDR images after post processing? If post processing uses the same format as everything else then there shouldn’t be a problem. But of course it is a problem because we can’t export images with high dynamic range, even the Recorder has issues with that.
Currently, the only way to accomplish high-dynamic range in EXR is to render it before post processing as a post processing effect. That’s the ONLY way to not have a clamped range.
I think that color buffer setting is bugged.