开发者

OpenGL 1.1 fog performance on iPad

is there a way to change per fragment fog to per vertex fog on iPad using OpenGL 1.1?开发者_StackOverflow社区 I have tried glHint(GL_FOG_HINT, GL_FASTEST) but the fps is still very low when using fog(fps is more than double without fog)


The iPad tends to be fill-rate bound. It has a big screen and a GPU that's about the same speed as an iPhone 3GS. So the per-fragment cost of the fog multiply can be significant.

The problem isn't the 'per fragment' issue (when I last checked, fog was per vertex on the ipad when running GLES 1.1) but that even a per-vertex attribute requires some small amount of fragment work. There was also a bug at one point (I do not know if it was fixed) where the fixed function fog was slower than necessary.

If you think that fog fill rate is lower than it should be and you can't do without fog in some cases, you may want to consider a rewrite to GLES 2.0, which would let you provide your own hand-optimized shader. We did this for our title and it was worth it fps-wise.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜