Does anyone have any experience of getting (true) HDR from raw photo image files?

With libraw I can get 16-bit output in a proper color space, but how do I scale it? Assuming 0-1 range I get images that are too dark, as I target 100 nits with 1.0 value.

Dividing by imgdata.color.maximum makes a variety of sample photos look good, but it also feels sketchy as fuck.

(All the "HDR + RAW" search results are about making the fake HDR-but-SDR out of many combined exposures.)

@wolfpld I've always taken it that RAWs are "raw" sensor data which I will not have tweaked much when taking other than to avoid clipping (and the assists that may have helped select exposure/"ISO" multiplier to bring me into a reasonable range) and until I open Lightroom/Darktable/Therapee and develop them, they will not be suitable for human viewing.
So you'd need to implement a full equivalent of auto-develop (that cameras use to make those often-bad jpegs) just targeting HDR range output.

@shivoa You have to do some processing to handle the Bayer matrix, white balance, color profile and so on. Libraw does this and you get a reasonably good looking SDR image.

What a photographer does in Lightroom/etc. is basically manually tinkering with the raw sensor output into a great looking SDR image.

My thought is, if there's all this extra data in the raw image, e.g. wide gamut or extended dynamic range, why not show it on the screen as HDR without having to compress it to SDR?

@wolfpld Yep, I fear that the real result for a good HDR from RAW involves a person using an HDR-aware copy of Lightroom etc to develop an HDR result from the raw sensor data. And the stock solutions that automagically "develop" an SDR result will take a lot of work to be rewritten to make an HDR result that looks satisfying (in the way you used to never use the on-camera jpeg results vs developing your own because they always fell so far short until endless iteration).

@shivoa The problem is that photo cameras are not designed for HDR output, so you get results that can be all over the place. Then the photographer may have his own favorite way of taking photos. And my method is basically to do a random thing and hope the result will be correct.

Most of the time it looks good, great even. A small percentage of photos look bland. Another small percentage is completely white unless you set the display brightness to 0% so you can see that 10000 nits.

ACR 15 adds High Dynamic Range Output - Greg Benz Photography

Adobe Camera RAW (ACR) v15 just added one of the most exciting features since the creation of RAW processing itself: High Dynamic Range Output ("HDR" or "HDRO"). This name might be confusing because we've used the term "HDR" for years, but now that same name is being used for a completely different display technology. This

Greg Benz Photography - Luminosity Masking, HDR, Photoshop Tutorials, and cityscape and landscape photography
@ngz0 That's basically what I'm seeing in my viewer.

@ngz0 The worst thing about HDR is that I can't show what it really looks like. So here's an approximation.

SDR on the left, HDR on the right. But you have to imagine that the building lights in the HDR image are as bright and contrasty as you would see in reality, not in a photo on a monitor.