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?