问题描述
我一直在到处寻找一种方法来消除用ShapeRenderer
(即ShapeType.Filled
)绘制的填充形状的抗锯齿边缘,但是找不到任何相关信息.
I've been looking everywhere for a way to anti-alias edges of filled shapes drawn with ShapeRenderer
(ie. ShapeType.Filled
) but can't find anything about this.
线条在Gdx.gl.glEnable(GL10.GL_LINE_SMOOTH)
下效果很好,但是我尝试过的任何方法都不能用于填充形状.那么,有人有什么建议吗?
Lines works well with Gdx.gl.glEnable(GL10.GL_LINE_SMOOTH)
but nothing I've tried works with filled shapes. So, does anyone have any suggestions?
推荐答案
也许此链接会有所帮助:多采样抗-在ANDROID上对LIBGDX进行提示
maybe this link will help: MULTI SAMPLING ANTI-ALASING IN LIBGDX ON ANDROID
通常,您必须启用多重采样才能使填充形状的边缘平滑.
in general you have to enable multisampling to have edges of filled shapes smooth.
http://www.opengl.org/wiki/Multisampling
这篇关于libgdx中的抗锯齿填充形状的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!