Flip issue with ldr (jpg and png) background texture on environment-settings component
vincentfretin opened this issue · 4 comments
I apparently didn't test that properly when I wrote the code. An hdr background texture works correctly.
I have this code:
aframe-gltf-model-plus/src/inflators/environment-settings.js
Lines 81 to 85 in cf6805c
flipY true has no effect here. If I change to false, there is no change. I confirmed it's right here we set the background by commenting the
scene.background =
line. :)There is something I don't get here.
I have no idea on this one.
https://threejs.org/docs/#api/en/textures/Texture.flipY
If I remember I tested loading jpg image for backgroundTexture with environment-settings aframe component you can use directly on a-scene with environment-settings="backgroundTexture: path/to/image.jpg"
, not through the glb, and I think it worked there using THREE.TextureLoader() (need to confirm that again). So maybe the GLTFLoader uses ImageBitmapLoader indeed, and I think it does from what I wrote in https://aframe.wiki/en/#!pages/memory.md
Not sure how to fix that and what we do differently from hubs code.
I tried to understand the issue but without success. The thing I noticed was that any change to filpY in the inflateEnvironmentSettings does not have any effect on the background image orientation. May flipY be overridden somewhere else in other parts of the code?