I want to use sibl.
const loadHDR = () => {
new THREE.RGBELoader().load('./resource/textures/HDR/Etnies_Park_Center_3k.hdr', (texture, textureData)=> {
texture.encoding = THREE.RGBEEncoding;
texture.minFilter = THREE.NearestFilter;
texture.magFilter = THREE.NearestFilter;
texture.flipY = true;
console.log(texture)
textureData.height = 1200
textureData.width = 1200
textureData.exposure = 10
console.log(textureData)
const cubemap = new THREE.EquirectangularToCubeGenerator(texture, { resolution: 3200, type: THREE.UnsignedByteType });
exrBackground = cubemap.renderTarget;
cubeMapTexture = cubemap.update(renderer);
texture.dispose();
})
}
This is my code. and
console.log(textureData)
The above code results show the revised values well. But cubemap's exposure does not change.
Another problem is reading .ibl file I have to read the position of the sun in webgl, but I can't read the file. I am using webpack. fs library no exist.