Skybox uses same image for all 6 faces #6773
omri-polycam
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys,
So I'm trying to integrate texture compression and mipmapping for use with skyboxes/cubemap using .ktx files generated from basisu. It seems to work well when using a metal backend as the 3D API on both mac and iOS.
I've hit a snag though when testing the code on Android (using the OpenGL backend). The skybox seems to use the same image for each of the 6 faces. See the attached screenshot. I tried cubemaps in general on Android generated from
IBLPrefilterContext::EquirectangularToCubemap
on the fly and it does not have this issue, the 6 faces of the cubemap have unique images and look correct. This makes me suspect this is a problem specific to using texture compression along with cubemaps. My code for loading a cubemap from ktx and from a png panorama image is below:I also attached the .ktx file that is problematic for Android/OpenGL and .png panorama it is generated from that works fine on all platform. Any input here would be appreciated.
Thanks,
Omri
Source panorama png (works fine on all tested platforms):

https://drive.google.com/file/d/1ZFwceoFNX2eI-ThBbvTy-1ls-qoHKgL4/view?usp=sharing
Texture compressed, mipmapped cubemap .ktx (problematic on Android/OpenGL):
https://drive.google.com/file/d/13aN1M67ZIygrhQSV2h1wFlG2t8uqXGji/view?usp=sharing
Screenshot from Android/OpenGL illustrating the bug:
Beta Was this translation helpful? Give feedback.
All reactions