|Topic was automatically imported from the old Question2Answer platform.
I’ve been trying to export my 2d-game running GLES2 to HTML5 and getting it to run properly. Whenever I do this, some of my textures appear to be missing in the exported version. This includes all my animated textures and textures that are applied to objects in code only and that are not visible in the editor.
Is there a workaround to this? I’ve looked around for answers on the web, but I’m not getting anywhere.
Are your textures using non-power-of-two sizes? This can cause various problems if they are set to repeat or are using mipmaps. The best way to fix this is to resize your textures to the nearest greater power of 2.
The WebGL 1.0 specification (which is similar to GLES2) does not mandate support for non-power-of-two textures.
Also, can you reproduce this when exporting the project to a native PC platform (Windows/macOS/Linux)?
Calinou | 2022-04-20 18:17
Thank you for your reply.
The first four png-files that aren’t exporting properly are all spritesheets containing 16 rows and columns. The total sprite dimensions are 2560x2560 which sounds like a power of 2 to me.
The other 15 png-files that aren’t exporting have all sorts of odd dimensions such as 58x53, 64x53, 45x51, 16x12 and 13x10 for example.
My sprites are not set to repeat nor using mipmaps.
Exporting to PC or macOS works just fine. I have had no issues whatsoever.
Magister Werner | 2022-04-20 20:29
Edit: added an answer instead.
EdJolly | 2022-11-16 15:20