Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LibGDX Texture Packer

I am trying to use LibGDX's texture packer gui for making a texture atlas of tiles for a video game. But I keep getting alpha bleed and I am wondering how to prevent that from happening? I have tried all the different filters and the only one which works was the Nearest filter but I need MipMaps so this would not work from a performance point of view. So is there a way to get rid of the alpha bleed with MipMaps?

I am using the 3.2.0 version of texture packer.

Here are images of what is happening with text explaining what is going on in each image.

Image zoomed out fully in game.

Slightly zoomed in.

Fully zoomed in and everything is fine.

like image 633
Scott Kingdon Avatar asked Apr 10 '26 06:04

Scott Kingdon


1 Answers

I solved it. In TexturePacker make sure you have PaddingX and PaddingY set to 2 or higher and put a check mark on the Duplicate padding. This will tell TexturePacker to duplicate the pixels on the edge which will get rid of the sprite/alpha bleed.

like image 178
Scott Kingdon Avatar answered Apr 12 '26 11:04

Scott Kingdon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!