I'm recently started working on a game in libgdx, and I've run into the problem that my sprites tend to get a thin, whitish outline around them. This is especially a problem for me since I'm working with ragdolls, so I'm drawing arms as separate sprites from the main torso and ending up with ugly outlines around them. After some googling, I found out this was from the linear filtering I'm doing on my textures. Problem is, linear filtering overall looks much nicer than nearest filtering. After more googling, I found out I should be able to fix this problem with alpha premultiplication. Unfortunately, I have no idea how to go about this in libgdx. Alternatively, if someone knows another way to get rid of the outline, that would be great too. Here is a screenshot showing what I'm talking about (Images are standins and don't actually belong to me). If you look at the arm, there are clear outlines at the shoulder and elbow.

enter image description here

  • 1
    \$\begingroup\$ Do you have a screenshot of your game, and links to these pages which you mentioned? \$\endgroup\$ – ashes999 Dec 15 '14 at 3:38
  • \$\begingroup\$ @ashes999 Not sure where I first read about the filtering issue, but its also covered here link where I found out about the premultiplication. \$\endgroup\$ – Science Dec 15 '14 at 3:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.