Scene enviroment set hdr file use TextureLoader

i want set scene enviroment use hdr file but hdr file load only RGBELoader
if i use RGBELoader data type is Uint16Array but i want change data type is img cause i want use url data
so i try hdr file load use TextureLoader but it not work
how can i change data type is img or use TextureLoader when i load hdr file

  const loader = new RGBELoader();
    const textureLoader = new THREE.TextureLoader();
      (hdrTexture) => {
        textureLoader.load(, (texture) => {
          copyScene.environment = texture;
      (xhr) => {
        console.log((xhr.loaded / * 100 + "% loaded");
      (error) => {
        console.error("Error loading HDR texture", error);

thank you and have a nice day

You could use the RGBELoader to load a hdr, and then you need to change the renderer.toneMapping .

The easiest code like this:

const loader = new RGBELoader();
loader.load(url, (texture) => {
   texture.mapping = EquirectangularReflectionMapping;
   scene.environment = texture;

renderer.toneMapping = ACESFilmicToneMapping;
renderer.toneMappingExposure = 1;

Also, you could see the examples about tone mapping.

1 Like

thank you so much
i try this