0 votes

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.

Godot version 3.4.3
in Engine by (12 points)

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)?

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.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.