Detect if the graphics device supports MSAA

My game uses forward rendering because I don’t have very many lights in my game (only the sun light) and I’d rather like to have MSAA available to my end users. However, certain graphics devices, such as the one in my laptop, don’t support MSAA. For those people, I’d like to use the Anti-Aliasing (Post-Effect) script to provide some of the same visual quality. As you can no doubt guess, I don’t want to have the AA (Post-Effect) script active if the user’s graphics device supports MSAA. How can I check that through scripting?

bump

bump

bump

found this when I was looking at image effects…

http://docs.unity3d.com/Documentation/Components/script-EdgeDetectEffectNormals.html

bottom of page.

Except I don’t want to know if a post-processing effect can run, I want to know if the user’s GPU will do multi-sample anti-aliasing, which is not a post-processing effect.

bump

Use Unity - Scripting API: SystemInfo

You will need to do some work. Using graphicsShaderLevel or checking vendor name is likely enough of a best-guess if you don’t want to have several profiles. Yes you need to do this work yourself, but that’s what commercial games have to do too. It’s the best you’ll get. It’s not too hard to cobble something together from that list.

I didn’t think of doing that. Thanks for the help!