[Android] Is it worth to upgrade to OpenGL ES 3.0?

My game received some feedback about graphics which needs more detailing. Even as of now my shader is sampling 4 textures in one pass to thirds the draw calls, and that’s the maximum number of sampling I can get without having to upgrade to Open GL ES 3.0.
And now I’d like to add more details to the geometry, but in order to that I need to sample more texture in one pass(to avoid adding more draw calls), and in order to that I need to switch to open gl es 3.0 (or I will have the “not enough interpolators” shader error)…
So the question is, is it worth it? Upgrading open gl version means less device supported but how many device is actually still using open gles 2.0?

[Edit]
Should this be posted on Android subforum? If it is, then please, admin, move this thread there :slight_smile:

1 Like

3527935--282550--android_opengles_version.png

https://developer.android.com/about/dashboards/

2 Likes

Snap!.. more than 1/3 of user…
I think I’ll stick with opengl es 2 for a while…
Thanks for the link btw

This data from Google seem fishy. Strange that in less than 5 months the percentage dropped 14 points, how the hell did it happen? Did everybody buy a new phone ?

You’re reading it wrong :slight_smile:
It’s the data for the last week.
This just means that the last week was very different from the first week of May.

just for information.

OpenGL 3 is buggy in MANY Sony devices and others.
You can expect a frame drop of around 30 FPS. Yes, no kidding.

For example;
Sony Xperia
ARMv7 VFPv3 Neon
Adreno 530
OpenGL ES 3.1 v@145.0

Frame rate of sample project
32 Fps,

Samsung Galaxy (Same specs)
Sony Xperia
ARMv7 VFPv3 Neon
Adreno 530
OpenGL ES 3.1 v@145.0

Frame rate of sample project
60Fps,

Now, if I change the graphic setting in unity for OpenGL2.
both phones go smoothly 60 Fps.

I think you misunderstand what’s happening there a bit :slight_smile:
OpenGL ES 2 will likely use different (read: simpler) shaders.
Same specs - I wouldn’t be so sure about that. GPU clock frequency, for example, is controlled by the OS based on manufacturer settings, which might be different between different devices even for the same manufacturer.
For example, is the resolution the same on both devices you’re testing this on?

Galaxy have better resolution (around 2k) so it is supposed to be slower against Sony full HD, both
using same adreno 520. (Checking specs using Snapdragon profiler)

Also in all test we set Resolution by script 1280, 720. (Checked the surface and bin in Profiler)
Tested with 6 phones. (Sony, Google, Galaxy, Sharp and others), All devices have OpenGL 3.0+
Using a simple shader output only color.
Setting Unity to Open GL3 then Open GL2 we have a hit of around 30 fps down in certain devices.
Setting Unity to Open GL2 then Open GL3, all devices are 60 fps.

Even some older devices with Snapdragon 805 and unity set to OpenGL3 (Sony is Snapdragon 820) can go 60 fps with no problem, but some new devices more powerful will be at 30 Fps or less.
Worst case is Sony Devices with Snapdragon 820 OpenGL 3.1. (Super frame hit).

Im 99% sure is a problem with Phone Drivers and Unity OpenGL 3.0.

This person also have the same problem,

Aiming for all android user is better to set Open GL 2.
I will test with more devices today.

1 Like

There’s no such GPU :slight_smile:

I’m pretty sure you’re wrong :slight_smile:

Which Unity version are you using? What shaders?

Sorry, was Adreno 530.

Im using;
Unity 2017.3.1p4
The blog who have the SAME problem with unity and Sony devices is using 5.4.

We can’t move to Unity 2018 as it have a bug with reading native depth buffer to rgb (confirmed by Unity, we have Premium Support).

Only one shader.

Shader Unlit.

Shader "PF/Unlit"
{
    Properties
    {
        _Color ("Color", Color) = (0,0,0,0)
    }
    SubShader
    {
        Tags { "RenderType"="Opaque" }

        Pass
        {
            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag

            struct appdata
            {
                half4 vertex : POSITION;
            };

            struct v2f
            {
                half4 vertex : SV_POSITION;
            };
            half4 _Color;
           
            v2f vert (appdata v)
            {
                v2f o;
                o.vertex = UnityObjectToClipPos(v.vertex);
                return o;
            }
           
            fixed4 frag (v2f i) : SV_Target
            {
                half4 col = _Color;
                return col;
            }
            ENDCG
        }
    }
}

Found more inconsistency.

Google Nexus 6.
Unity Settings.
OpenGL 3.0 → read Depth Buffer, no good.
OpenGL 2.0 → read Depth Buffer, ok!

For what I can see the devices that show inconsistency are all OpenGL 3.1.

Can you submit this a a bug report (ES3 vs ES2 performance)? I’d really like to take a look on that.

Sure, I did ask it before yesterday direct to unity and the answer we had is driver issues on OpenGL 3.0.

Idk if its allowed to post direct unity answer but was basically;
OpenGl 3.0 driver and an issue with`glClientWaitSync` .

So imo is best to go opengl 2.0 to get more android compatible.

Well, it might be. However, the problem should be there only on old drivers. Do you have the full driver versions used on both devices?

Is there a way to force a device that supports OpenGL ES 3.0 to use ES 2.0? (without removing ES 3.0 from the build entirely)

We too are running into issues with buggy device drivers, but we don’t want to make an ES 2.0 only build. But we’d like to have an option in game to force it into ES 2.0 mode, to give more options to people that are having problems with the game with the ES 3.0 version.

@AcidArrow Not at the moment. And it’s quite complicated to provide that from the architectural point of view.
We’re discussing the possibilities for this internally, as there have been requests for this functionality.

1 Like

I thought this was the case but thanks for confirming it.

Nice to know it is being worked on (or at least, discussed).

Oh I completely forgot about this. We have many issues with cache server now.

The solution Unity gave us was reporting to them all the devices we found with driver problem and they will add it at the next release. The plan is to release using opengl 2.0 as our target device are 3-4 year old but for that we must fix some minor issues (and gain FPS).

If is a big game I recommend paying for unity support instead of using the forum.

By now (May '19), Open GL ES 2 distribution has dropped to 1/5. I’m also guessing that an even smaller share of Android 5+ (Lollipop or upwards) phones still requires version 2, and that owners of such phones are less likely to play games. So we decided to target Lollipop+ and Open GL ES 3+.

2 Likes

I just saw the reply, one year later :smile:
I read it correctly. What I meant is that since the graph posted above dated may 2018(see few posts above) and when I saw the updated graph on the website in October only 5 months had passed but the amount of users supporting only GL ES 2.0 had decreased a lot, 15% less.
Which is an enormous amount considering the huge number of Android devices around.