libgdx texture edge blending problem

I have two completely white bitmaps here:

They're there, trust me.

When I put one on top of the other and scale them down with TextureFilter.Linear I get this:

How do I get rid of the dark pixels?

2 Answers

This is just a guess, but I notice that the edges of your image(s) are anti-aliased. When you scale the images down using Linear filtering, the semi-transparent edges might be set to black, because the filter cannot handle semi-transparent pixels. This is just an idea, but it might be worth a try to remove the semi-transparent pixels which surround the image(s).

• The pixels dividing the halves aren't antialiased, but the problem is also apparent there. I solved this problem by premultiplying the alpha with white, not an ideal solution but good enough for mobile displays. – TimSim Dec 6 '14 at 1:23

The problem was the texture packer that messed up the bitmaps. How I solved it is I premultiplied the bitmaps with white using Photoshop (Export -> Render Video).