# Hdr effect on Model vanishes in Ar.js + Three.js

**URL:** <https://discourse.threejs.org/t/hdr-effect-on-model-vanishes-in-ar-js-three-js/22532>\
**Category:** Questions\
**Tags:** textures, materials\
**Created:** [January 18, 2021, 9:01am UTC](https://discourse.threejs.org/t/hdr-effect-on-model-vanishes-in-ar-js-three-js/22532 "2021-01-18T09:01:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![surabhi\_arora](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/surabhi_arora/32/10036_2.png) [@surabhi\_arora](https://discourse.threejs.org/u/surabhi_arora)\
**Post date:** [January 18, 2021, 9:01am UTC](https://discourse.threejs.org/t/hdr-effect-on-model-vanishes-in-ar-js-three-js/22532/1 "2021-01-18T09:01:59Z")

</div>

Hi  
I was trying to add hdr reflection on my model in Ar.js + threeJS.  
The first time, the model renders the hdr effect is visible but after something hdr effects vanish. Or If I refresh the page, the hdr effect vanishes. I using the following code to add an hdr effect.

```
const pmremGenerator = new PMREMGenerator(renderer);
pmremGenerator.compileEquirectangularShader();
const rgbeLoader = new RGBELoader();
rgbeLoader.setDataType(UnsignedByteType).load(background, (texture) => {
  const envMap = pmremGenerator.fromEquirectangular(texture).texture;
  scene.environment = envMap;
  texture.dispose();
  pmremGenerator.dispose();
  render();
});

```

Plz suggest me a solution?
