Have anyone advice for Anti-aliasing in ipad2?
It is possible? What are you asking? Try it on your game and see if it still runs at 60fps. I have found AA to be less taxing than I imagined it to be before I added it to my game. It wouldn’t hurt to test it out.
Just test. PowerVR is very fast at doing AA.
We are using 8X AA on iPad 2/iPad 3/4S/5 at 60fps on forma.8 with no framerate impact at retina resolution… ![]()
It’s a fixed (ish!) gpu cost of a couple of millisecs on ipad2, but saying “PowerVR is very fast at doing AA” is wrong for 3gs and ipad, iphone 4.
I create a model to ipad2, how to set anti-aliasing.
request a advice!
Well, PowerVR is fast on AA, but on iPad and iPhone 4 the GPU is horribly underpowered for the number of pixels. ![]()
On forma.8 we use AA2X on 3GS without problem and 2X on iPhone 4 with some hiccup (60fps for 99% of the time) - i’ts not really necessary since on 3GS the resolution is so low and on iPhone 4 the retina display alredy does a good job at aiding jaggies, but whathever… No AA on iPad 1, it’s just too much. ![]()
8X on everything else. ![]()
You need to set it in the Quality Settings: Edit → Project Settings → Quality. And then enable the appropriate one via code.
We also need to set the AA level per device, I’m not sure why but every time I changed scene the AA level would change back to the one in the Projects quality settings.
So I wrote this script that you can place in your first scene, set what you want the level of AA to be for each iOS device. And when you change scene it detects the change and set the AA again.
using UnityEngine;
using System.Collections;
public class AA_Picker : MonoBehaviour {
public int iPhone_ = 0;
public int iPhone3G_ = 0;
public int iPhone3GS_ = 0;
public int iPhone4_ = 0;
public int iPhone4S_ = 2;
public int iPhone5_ = 8;
public int iPodTouch1Gen_ = 0;
public int iPodTouch2Gen_ = 0;
public int iPodTouch3Gen_ = 0;
public int iPodTouch4Gen_ = 0;
public int iPodTouch5Gen_ = 4;
public int iPad1Gen_ = 0;
public int iPad2Gen_ = 4;
public int iPad3Gen_ = 2;
public int Unknown_;
public int AALevel;
void Awake(){
DontDestroyOnLoad(transform.gameObject);
SetAA();
}
void SetAA(){
#if UNITY_IPHONE
if(Application.platform == RuntimePlatform.IPhonePlayer){
if( iPhone.generation == iPhoneGeneration.iPhone)
{
AALevel = iPhone_;
}
else if( iPhoneSettings.generation == iPhoneGeneration.iPhone3G)
{
AALevel = iPhone3G_;
}
else if( iPhoneSettings.generation == iPhoneGeneration.iPhone3GS)
{
AALevel = iPhone3GS_;
}
else if( iPhoneSettings.generation == iPhoneGeneration.iPhone4)
{
AALevel = iPhone4_;
}
else if( iPhoneSettings.generation == iPhoneGeneration.iPhone4S)
{
AALevel = iPhone4S_;
}
else if( iPhoneSettings.generation == iPhoneGeneration.iPhone5)
{
AALevel = iPhone5_;
}
else if( iPhoneSettings.generation == iPhoneGeneration.iPodTouch1Gen)
{
AALevel = iPodTouch1Gen_;
}
else if( iPhoneSettings.generation == iPhoneGeneration.iPodTouch2Gen)
{
AALevel = iPodTouch2Gen_;
}
else if( iPhoneSettings.generation == iPhoneGeneration.iPodTouch3Gen)
{
AALevel = iPodTouch3Gen_;
}
else if( iPhoneSettings.generation == iPhoneGeneration.iPodTouch4Gen)
{
AALevel = iPodTouch4Gen_;
}
else if( iPhoneSettings.generation == iPhoneGeneration.iPad1Gen)
{
AALevel = iPad1Gen_;
}
else if( iPhoneSettings.generation == iPhoneGeneration.iPad2Gen)
{
AALevel = iPad2Gen_;
}
else if( iPhoneSettings.generation == iPhoneGeneration.iPad3Gen)
{
AALevel = iPad3Gen_;
}
else if( iPhoneSettings.generation == iPhoneGeneration.iPadUnknown)
{
AALevel = iPad2Gen_;
}
else
{
AALevel = Unknown_;
}
}else{
AALevel = Unknown_;
}
#endif
QualitySettings.antiAliasing = AALevel;
}
void OnLevelWasLoaded(){
SetAA();
}
}
That’s weird.
We detect the device at startup and set the quality there, it never changes between scenes. ![]()
We set it only on Awake in the first loader/initialisation scene, and use case statements. Ice Flame’s script is 107 lines long, and when you consider there’s only 4 devices out of 14 he wishes to use AA on, it seems a little excessive. However, it would work, but there’s no reason to change it between scenes, since your hardware isn’t going to change.
Ice Flame’s script is good for me.
Thank you!