Search Unity

Glitches/crash on OpenGL ES 3.0 devices when built with Open GL ES 2.0

Discussion in 'Android' started by Wom, Dec 5, 2013.

  1. Wom

    Wom

    Joined:
    Feb 7, 2013
    Posts:
    38
    No problems in my game when when running on PC/OS X/iOS.

    Upgraded to Unity 4.3, everything was going fine - tested with a Nexus 1, Nexus 7 (2012), iPad 2 and iPad Air - no problems.

    Then I tried it out on some friends more modern Android devices and got graphical glitches and/or game crashes on every one.
    The devices tested were:
    - Samsung Galaxy S3
    - Samsung Galaxy Note 2
    - HTC One
    - Sony <... something, I think Xperia>

    I also finally this week got my hands on my own Nexus 5... and got the same graphical glitches (mostly with the rendering of NGUI textures).
    Yay - now I have a device I can reproduce the problem on!

    According to http://en.wikipedia.org/wiki/OpenGL_ES; of the Android devices I'm seeing problems with, all of them support Open GL ES 3.0

    What I've seen is that when I build the game targeted at Android with Graphics Level at Open GL ES 3.0 - the game works on my Nexus 5!
    I've only reproduced on the Nexus 5 so far - but I'm pretty confident I'm on the right track.

    When I revert back to Open GL ES 2.0, the game starts glitching again - successful reproduction, problem solved!


    But now what? I had just assumed anything that supported ES 3.0 would support ES 2.0. Is this a bug that can be fixed by Unity - or is this a choice I have to make between ES 3 and ES 2 Android devices? Is anyone else seeing this - maybe I'm doing something crazy with my shaders or something?

    Is there a way to switch between Open GL versions on the fly, or do I need to make multiple versions if I want my game to run on a 2012 Nexus 7 and a Nexus 5?

    ----

    2013-12-06 Edit:
    I found this post about multithreaded rendering, which seems more likely the cause of this problem: http://forum.unity3d.com/threads/211913-4-3-Multithreaded-rendering-crashes-when-running-on-device

    For info though if it helps anyone, this week I tried out an "OpenGL ES 3.0" build on two of the devices listed above:
    - Samsung Galaxy S3 - didn't run at all; I think because it doesn't actually support ES 3, which blows my "ES 2 build running on ES 3 capable devices" theory out of the water anyway
    - HTC One - rendering was absolutely fine; this is one of the devices that the game actually crashed on last week when it was build with ES 2 + multithreaded rendering
     
    Last edited: Dec 6, 2013
  2. SkaiCloud

    SkaiCloud

    Joined:
    Aug 10, 2011
    Posts:
    53
    Nope your not crazy. I'm getting the same issue with Samsung Note 3 and S4. I don't no if this is unity issue but when I disable ALL Ngui gui and build to ES 2 the game runs fine of course with no GUI! Once I turn on my gui cam back on and build to ES 2, graphical error glitch and eventually crash. I think it has something to do with NGUI panel sorting layer. I hope someone can solve this issue, I'm going to post on NGUI as well.
     
  3. Wom

    Wom

    Joined:
    Feb 7, 2013
    Posts:
    38
    I run NGUI too and was able to avoid the issue by disabling the GUI.
    I think it's possible it might be related to multi-threading and having multiple cameras (NGUI uses a second camera).
    But I'm not willing to try and diagnose it (not after the answer on the thread I linked) - I just switched off multi-threaded rendering and got on with my development.

    Does switching off multi-threaded rendering not help for you?
     
    Last edited: Mar 13, 2014
  4. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,624
    heads up: NGUI bugs with OpenGL ES2 multi-threaded rendering should be fixed in 4.5.2 Patch 3 (to be released soonish).
    Please try it out when it is available
     
  5. hectorAtPetro

    hectorAtPetro

    Joined:
    Aug 26, 2014
    Posts:
    2
  6. 3adnaan

    3adnaan

    Joined:
    Nov 2, 2013
    Posts:
    3
    Arabic letters not rendering on devices with OpenGL ES 3 like Nexus 4 and Nexus 5.
    Any help please !
    Thanks in advance