Use Babylon to load HDR textures

Hello everyone,

In a moment of desperation I decided to seek help here.

I’m writing my own Webgl2 renderer, and I’m at the point where I need to load .hdr images.
Well, I’m not sure how, it seems like the classic “const image = new Image()” and so on doesn’t work with this format.

I was wondering if Babylon could help with that: all I need is to load the image, so I can then use it as a regular texture in my shaders (binding, sampling, and so on)

Is this possible at all?

Thanks, and happy new year (only a couple of hours left to the new year here in Australia)

Yup we do it in Babylon like this: Babylon.js/hdr.ts at master · BabylonJS/Babylon.js · GitHub

That worked well, thanks!