Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

SkyBox problem on iPad Air (works fine across other iPads)

Discussion in 'iOS and tvOS' started by aureliocalegari, Nov 7, 2013.

  1. aureliocalegari

    aureliocalegari

    Joined:
    Dec 26, 2012
    Posts:
    20
    Hello All,

    I've been developing a space app for a while and I was testing it in the following devices:
    - iPad 2 (iOS 7.0.3)
    - iPad 3 (iOS 7.0.3)
    - iPad Mini (iOS 7.0.3)

    Then early this week I got an iPad Air (iOS 7.0.3), and as I loaded the app on it I noticed the the skybox is not going smooth as we navigate and rotate through the space. Basically the edges get 'disjoint' as we spin. Sometimes it's a mixture of sections of it getting blurred and freezing.

    The app though runs very fast. Performance wise it's fantastic, but I'm just wondering if it's a low level underlying OpenGL issue, since they now support OpenGL ES 3 on the A7 family.

    Not sure, leave for the experts... Anyone with similar issues? Any known bug or workaround?

    Regards
    Aurelio
     
  2. Agent_007

    Agent_007

    Joined:
    Dec 18, 2011
    Posts:
    899
    Is there any screenshot you could share that shows the issue?
     
  3. dbchamb

    dbchamb

    Joined:
    Apr 12, 2013
    Posts:
    1
    I had this problem as well. In fact it happened for my app on iPhone5s and Kindle also. I couldn't find anyone reporting any issues, so after some research, realized it only happened when the far clipping plane was set quite high. Since I couldn't reduce the clipping plane, the following workaround solved it for me, which I only use when I detect the app is running on one of the problem devices:
    1. Set the main camera's Clear Flags to Depth Only
    2. Create another camera and keep its position and rotation in sync with the main camera. The Clear Flags for this new camera should be Skybox.
    3. Leave the near clipping plane at .3 for the new camera and set the far clipping plane to 1.
    4. Change the Culling Mask for the new camera to Nothing.
    5. Add a Skybox component to the new camera and set it to the skybox you want.
    6. I also change the depth of the new camera to -2 (the main camera's depth is -1), but I'm not sure that matters.
    I detect the new devices with the following. But since I don't own an iPhone5s, it may not work correctly!
    Code (csharp):
    1. if(SystemInfo.deviceModel  (SystemInfo.deviceModel.StartsWith("iPhone6") || SystemInfo.deviceModel.StartsWith("iPad4"))) {
    2.    ...
    3. }
    There are probably cleaner workarounds or better ways to detect the problem devices (I would like to use them if there are), but this worked for my app.
     
  4. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    27,805
    Should report as bug just in case.
     
  5. aureliocalegari

    aureliocalegari

    Joined:
    Dec 26, 2012
    Posts:
    20
    Hey thanks dbchamb for the workaround idea! Now working like a charm!

    Cheers
    Aurelio
     
unityunity