views:

2314

answers:

5

I have been unable to find a way to anti-alias my rendering on iPhone OS 3.0 + OpenGL ES 2.0. I had assumed there would be multisampling but that appears to not be the case. I've been told that fragment shaders can be made aware of the projected pixel via a partial derivatives extention but I have no idea where that functionality lives or whether Apple actually supports it.

My background is RenderMan where I have significant control of how I attenuate high frequency artifacts. Without proper anti-aliasing - at the shader level and at the rasterization level. Vertex and fragment shaders will suffer from noticable jaggies and all manner of visual schmutz.

Could someone please clarify the status of anti-aliasing. Thanks.

-Doug

+1  A: 

I'm guessing it's just not supported by the hardware. I was recently trying to get antialiasing working on my MacBook (cf. glEnable(GL_POLYGON_SMOOTH)), and after trying everything I could think of, I eventually discovered it simply wasn't supported by my hardware, according to this thread. I have no idea whether you can achieve antialiasing with vertex or fragment shaders, since I'm unfamiliar with them.

Adam Rosenfield
+2  A: 

I got the answer I feared on the Apple dev forum: https://devforums.apple.com/message/85973#85973

No screen space anti-aliasing. Yes shader anti-aliasing (although I haven't confirmed the shader anti-aliasing).

A bit dissapointing to say the least. Sigh.

-Doug @dugla

dugla
A: 

It's really strange that iphone 3gs does not have any sceen space aa. according to the Graphic processor vender's specification. 1.1.6. Improved Anti-Aliasing " POWERVR SGX further improves the anti-aliasing performance and quality of the previous generation MBX family by offering 4-sample sparse grid multisampling anti-aliasing (MSAA) which offers quality that often comes close to 16-sample ordered grid anti-aliasing. " There should be much better anti-aliasing supported by hardware.

A: 

There is hardware-suported, multi-sampled anti-aliaising on both MBX and SGX chips - check the documentation available on Imagination's website and it's available on other SGX/MBX devices. However, this functionality hasn't currently been exposed by Apple on the iPhone so, sadly, you can't currently use it.

gmaclachlan
+1  A: 

It has now mate. iOS4 has I think 4x multisampling or whatever. Hope many people use it... To kill those pixel jagged lines

Jim
Yah, I saw that. Very cool. Cheers.
dugla