2

I am making libgdx game, and i want to have smooth circle character. Now i have 128 x 128 circle texture, which looks proppertly in paintnet but have ragged edges in game . I draw this texture by:

 width=height=Gdx.graphics.getWidth()/4;
 game.batch.draw(game.assets.good_guy,x,y,width,height);

I have tried to use photoshop, paintnet, gimp and inkscape but the texture was ragged all the time.

This is how it looks like in game:

ragged circle

And this is how looks texture:

texture view

peterSweter
  • 633
  • 6
  • 23

1 Answers1

2

try to keep the aspect ratio, if your texture is 128x128 and you as another ratio scales can show sawtooth, read about texture filtrer http://www.badlogicgames.com/wordpress/?p=1403 or use, svg or OpenVG Is there a way to incorporate vector graphics into LibGDX development?

Community
  • 1
  • 1
Angel Angel
  • 19,670
  • 29
  • 79
  • 105
  • @peterSweter, I recommend you use the texture filter (MipMapLinearNearest, Linear) to get this looking cleaner. It's looking ragged because of the lack of mip mapping. It will look even better with (MipMapLinearLinear, Linear), but that is a bigger performance hit. – Tenfour04 Dec 13 '14 at 18:20