Libgdx texturepacker doesn't pack all images

367 views Asked by At

When i run the texturepacker in libgdx i have the problem that it doesn't pack all the images in one big sprite sheet. If i for example have 4 images and it only packs 3 of them. Note that 2 images are the exact copies of eachother so maybe that has something to do with it.

2

There are 2 answers

3
Genhis On BEST ANSWER

LibGDX by default doesn't pack images which are exact copies. This can be overridden by setting alias to false in your configuration.

alias: If true, two images that are pixel for pixel the same will only be packed once. (default: true)

However, usually it is beneficial to pack the same images only once because it creates a smaller texture. You can still use both names when getting TextureRegion objects or creating Sprite.

0
Tenfour04 On

Set alias to false in the texture packer settings.

Documentation here