Anti-aliasing for iPhone?

Hi,

I’m not having any luck seeing any anti-aliasing when deploying to the iPhone / iPod touch.

I have read that the devices support x4 multisampling… but does Unity iPhone work with it?

Any info would be appreciated.

Cheers,

-Nick

I’ve never seen a single iPhone 3D game that had anti-aliasing, Unity or otherwise. Even if it is possible, it would be pretty useless considering the extremely limited amount of RAM it has available for graphics.

–Eric

Well, it would be fine if you only had a very basic setup, like, a GUI or something in 3d.

Obviously, unless we’re talking about the most basic of games, you wouldn’t use it for that :slight_smile:

Saw a post on here that was pretty clever.

It’s a phone, not a slow computer.

I really don’t think AA is necessary even if the thing could do it for free.

Well, it would get rid of the fairly ugly aliasing, so I’d definitely do it even if it wasn’t free (and there was enough RAM), but I don’t think it’s possible.

–Eric

Anti-aliasing doesn’t really require RAM. You just need processing power.

Anti-aliasing very much needs RAM, since the screen is rendered at a higher resolution (= more RAM) and then sampled down, the method for which varies depending on whether you’re using super-sampling or multi-sampling. Change the AA level in Unity and watch the VRAM usage in the game stats to see this in action (currently requires a restart of Unity to see the effect).

–Eric

That only requires a lot of RAM if a) your screen resolution is already large (the iPhone’s isn’t) and b) you use a high supersample multiplier (which presumably, you wouldn’t on an iPhone).

At twice the dimensions, the iPhone would only need an extra 1.8MB. It’s not insignificant, but the iPhone easily has enough RAM for it. What it doesn’t have is the processing power to do the actual sampling.

and 3) if you only have 24mb of RAM and the regular back and frontbuffer already eat over 2MB of it.
Add in supersampling and you are at < 20mb of VRAM, not the smartest idea.

don’t know how you come up with 1.8mb, as it will always be power of 2. non power of two targets don’t exist.

It would have the power to do the sampling but then the sampling would be more or less everything it did :wink:

It’s frequently a squeeze trying to get everything in the limited VRAM as it is, so removing even a few MB from the total would make it infeasible in many cases.

It would be OK with simplistic games, but like I said, I’ve never seen it done even once, and indeed the processing power is also problematic. Maybe the 3GS can do it?

–Eric

Are there information on the shared VRAM size on the 3GS? Was it raised at all?

Hello,

Actually, the MBX in the iPhone does support some AA for “almost free” as well as going up to 4x for a cost. In particular the form of 2xAA it has is very fast. Please note, it uses a tile based architecture and the increase in RAM is zero - and the need for extra frame-buffer memory is zero. There is an increase only in on-chip render memory which is tiny! As an earlier poster mentioned, it’s not a slow computer - it’s a very advanced tile based deferred rendering engine :slight_smile: For gory details, please google one of the many low-level talks given at GDC Mobile or other game gatherings. I’ll toot my own horn here and link to one of my ancient presentations that includes some tile based stuff :slight_smile:

So having said all that, Apple probably turned it off. They’ve disabled several other things the MBX can do like simple vertex shaders :frowning: They do odd things like that.

The 3GS is based on the SGX 535 and also has a tile-based architecture. It also has the AA benefits from tiling using tiny “render buffers” and can render (if I remember correctly) up to 16x but I don’t recall exactly at the moment - it’s kindof late here at the moment :slight_smile: Lots of this can be found at the IMG web site if you register. But they do NOT support iPhone dev - they refer everything to Apple - FYI… Hope this helps!

Stephen

hehe

What the hardware would be capable of and what Apple exposes is another story. I guess some of the things were disabled because they are generally to slow or would resources that apple is not willing to sacrifice to the graphics. After all, all higher features require more “cpu time on driver” and apple put quite some effort in in making the driver backend as fast as possible by removing any optimization of the incomming data etc

So what about these games with Anti-Aliasing in them?

It is obviously possible.

Here you go:

http://jamstudiosgames.com/publications/multisampling.pdf

I haven’t used it in our projects yet, but knock yourself out! :slight_smile:

Tommy.

Thank you so much :slight_smile:

Did anybody get this to work on their Unity project?

FYI, Anti-Aliasing support for iOS is coming in Unity 3.2 soon.

Sweet, thanks :wink:

Good news, thank you.