So I did this upgrade and been squashing a tonne of issues that came about because of it and I’m mostly in a very stable place with the upgrade. However I am getting a very specific issue with our RGBE Loader
So previously it was like this:
new THREE.RGBELoader()
.setDataType(THREE.UnsignedByteType)
.load(hdrPath, (texture) => {
let environmentMap = pmremGenerator.fromEquirectangular(texture).texture
pmremGenerator.dispose()
resolve(environmentMap)
}, undefined, (err) => {
reject('Error loading HDR environment map')
})
})
now it is like this
const RGBELoader = (await import(urls.getURL('RGBELoader'))).RGBELoader
new RGBELoader()
.setDataType(THREE.HalfFloatType)
.load(hdrPath, (texture) => {
let environmentMap = pmremGenerator.fromEquirectangular(texture).texture
pmremGenerator.dispose()
resolve(environmentMap)
}, undefined, (err) => {
reject('Error loading HDR environment map')
})
})
The geturl simply returns the link to the cdn version of threejs RGBELoader add on. that works fine.
The issue comes when we have a shiny metallic object. 1 particular one to be specific. It does not act reflective no matter what environment I use.
I’m sure the issue has to do with the datatype from .setDataType(THREE.UnsignedByteType) to .setDataType(THREE.HalfFloatType) but I dont get any errors that confirm this (it doesnt throw any errors at all).
I have tried both FloatType and HalfFloatType and not setting the datatype at all. am I missing something here? I did previously do some research to figure out the change of datatypes and I have looked at your changelog that referencers this but I am still not sure why I am getting this issue. Im free to clarify anything you would like.