# Use Babylon to load HDR textures

**URL:** <https://forum.babylonjs.com/t/use-babylon-to-load-hdr-textures/17048>\
**Category:** Questions\
**Created:** [December 31, 2020, 1:39pm UTC](https://forum.babylonjs.com/t/use-babylon-to-load-hdr-textures/17048 "2020-12-31T13:39:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paolo\_Ferri](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/paolo_ferri/32/13272_2.png) [@Paolo\_Ferri](https://forum.babylonjs.com/u/Paolo_Ferri)\
**Post date:** [December 31, 2020, 1:39pm UTC](https://forum.babylonjs.com/t/use-babylon-to-load-hdr-textures/17048/1 "2020-12-31T13:39:18Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [December 31, 2020, 2:46pm UTC](https://forum.babylonjs.com/t/use-babylon-to-load-hdr-textures/17048/2 "2020-12-31T14:46:34Z")

</div>

Yup we do it in Babylon like this: [Babylon.js/hdr.ts at master · BabylonJS/Babylon.js · GitHub](https://github.com/BabylonJS/Babylon.js/blob/master/src/Misc/HighDynamicRange/hdr.ts)

---

<div class="post-metadata">

**Author:** ![Paolo\_Ferri](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/paolo_ferri/32/13272_2.png) [@Paolo\_Ferri](https://forum.babylonjs.com/u/Paolo_Ferri)\
**Post date:** [January 2, 2021, 6:06am UTC](https://forum.babylonjs.com/t/use-babylon-to-load-hdr-textures/17048/3 "2021-01-02T06:06:58Z")

</div>

That worked well, thanks!
