如何制作光滑的圆形纹理?

时间:2014-12-13 13:15:49

标签: java graphics libgdx textures texture2d

我正在制作libgdx游戏,我想拥有流畅的圆圈角色。现在我有128 x 128圆形纹理,它在paintnet中看起来很专横但在游戏中有不规则的边缘。我通过以下方式绘制此纹理:

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

我曾尝试使用photoshop,paintnet,gimp和inkscape,但纹理一直都很破旧。

这就是游戏中的样子:

ragged circle

这就是看起来质感的方式:

texture view

1 个答案:

答案 0 :(得分:2)

尝试保持宽高比,如果你的纹理是128x128而另一个比例尺可以显示锯齿,请阅读纹理过滤器http://www.badlogicgames.com/wordpress/?p=1403或使用,svg或OpenVG Is there a way to incorporate vector graphics into LibGDX development?