Quantcast
Channel: Question and Answer » libgdx
Viewing all articles
Browse latest Browse all 434

How to eliminate the outline in libgdx?

$
0
0

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.


Viewing all articles
Browse latest Browse all 434

Trending Articles