javagraphicslibgdxtexturestexture2d

How to make smooth circle texture?


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


Solution

  • 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?