Questions about KTX2 in v8 #10222
-
Hi I'm trying out ktx2 in v8 (rc9) and stumbled upon an issue. I created several .ktx2 files (etc1s & uastc, all of them 777x1198) with different settings and none of them are loading, only the .png is loading. I also created a sprite animation with multiple .ktx2 files (one is etc1s and one uastc, all of them 1920x1080) starting from a .jpg and these load without an issue. NOTE: Don't mind the 'KTX2 Disabled' button, that's for a different test. The warning I get on the sprite test is: I have also created a npm package myself to load KTX2 with Pixi. I got it working in Pixi v7 and have no warnings with any of my tests. I have migrated this project to Pixi v8 and changed the loader to the Pixi KTX2 loader. Question 2: Is there a reason we have to add the loadKTX and resolveCompressedTextureUrl to the correct parsers ourselves instead of being added standard to the extension? I know I have to do it for my package, because it's a separate package. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Update on Question 1: |
Beta Was this translation helpful? Give feedback.
-
I can assume that your basis textures are being converted to BC7 format on the desktop. It's important to note that for BC7 textures, when used in WebGL, the width and height must be multiples of 4, according to https://registry.khronos.org/webgl/extensions/EXT_texture_compression_bptc/ Try to change the size of your textures from 777x1198 to, lets say, 780x1200. |
Beta Was this translation helpful? Give feedback.
-
So the black images issue was indeed because of BC7 that needed multiples of 4 for the width and height size. My package transcoded it to BC3. |
Beta Was this translation helpful? Give feedback.
I can assume that your basis textures are being converted to BC7 format on the desktop. It's important to note that for BC7 textures, when used in WebGL, the width and height must be multiples of 4, according to https://registry.khronos.org/webgl/extensions/EXT_texture_compression_bptc/
Try to change the size of your textures from 777x1198 to, lets say, 780x1200.