Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non-square textures missing 1x1 mip level, which WebGL needs to render #40

Open
bunnybones1 opened this issue Nov 20, 2021 · 1 comment

Comments

@bunnybones1
Copy link

I was unable to get a non-square texture with mipmaps to render in WebGL unless I squared it myself beforehand.
The non-square texture coming out of crunch looks healthy to me.
Screen Shot 2021-11-20 at 12 31 02 PM

The idea came from someone who had this issue with ETC textures, and their solution seems to work (for android, where ETC is most common):
google/etc2comp#31

PVRTC ofcourse strictly requires square textures, so the bug is simply not possible there.

@bunnybones1
Copy link
Author

After some testing, I made a funny discovery:
If you make the image wider, instead of taller, it generates all the mip levels up to 1x1, and it works
Somewhere in the code, it must be using the width as the basis for the mip level count.
This does atleast open up a workaround: we can rotate all our textures 90 degrees before compressing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant