2

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.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Scott Kingdon
  • 351
  • 1
  • 2
  • 9
  • What is your configuration for the texture packer? Are you sure its the TexturePacker? (Do the problems go away if you don't pack the textures?) – P.T. May 15 '14 at 04:26
  • Can you explain what you mean by alpha bleed? Maybe you just need more padding around your sprites, or maybe you need to pre-multiply alpha. Not sure what your issue is though. – Tenfour04 May 15 '14 at 17:34
  • What I get is between each tile is a small bit of translucent to transparent texture when I zoom out all the way. As I zoom in these transparent or translucent parts flash from being all there to again being transparent to translucent. By the time the video game is zoomed in fully all textures display perfectly 100% of the time. But as soon as I am zoomed out at any time then the edges of the texture start either going translucent or transparent again. – Scott Kingdon May 15 '14 at 21:27

1 Answers1

1

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.

Scott Kingdon
  • 351
  • 1
  • 2
  • 9