I’m loading in a hrd texture into my project using a rgbeLoader
but for some reason the textures reflection gets flipped.
Notice how the sun is the background but still manages to reflect of the glass on the backside of the boat. There is no reflection on front side.
export function loadEnvironment(url) {
let rgbeLoader = new RGBELoader();
rgbeLoader
.setPath("../../images/EquirecMap/")
.load("skargarden.hdr", function (texture) {
let pmremGenerator = new THREE.PMREMGenerator(renderer);
pmremGenerator.compileEquirectangularShader();
texture.mapping = THREE.EquirectangularReflectionMapping;
envMap = pmremGenerator.fromEquirectangular(texture).texture;
pmremGenerator.dispose();
//scene.background = texture;
let options = {
generateMipmaps: true,
minFilter: THREE.LinearMipmapLinearFilter,
magFilter: THREE.LinearFilter
};
scene.background = new THREE.WebGLCubeRenderTarget(
1200,
options
).fromEquirectangularTexture(renderer, texture);
scene.environment = texture;
});
}
This is my loader settings. How do I reverse the reflection?