- Home /
SystemInfo.supportsComputeShaders always false on Android
Hello,
I'm trying to get compute shaders to work on Android but SystemInfo.supportsComputeShaders always return false when my target platform is Android. When I select Windows as my target platform, it works well. To be more precise, I'm testing in unity editor with the Android selected at my current platform, not on an actual android device.
Here are the settings I'm currently using. I've also tried other settings based on information I've seen online. I am currently using Unity 5.6.0 and the android API target is 5.0.
Is there a setting I'm missing that could cause this ? Thank you.
I've tried with the most recent version of unity and I still get the same results.
To clarify, is SystemInfo.supportsComputeShaders returning false on the Android device itself? (and, if so, are compute shaders actually working for you)? Or is SystemInfo.supportsComputeShaders returning false only in the editor when setting Android as the target platform?
Answer by Sprawl · Jan 11, 2018 at 04:14 PM
This issue is now fixed in 2017.3 It might have been fixed in earlier 2017 version too.
Hi, I wonder how you fixed it. I am using 2017.3, same settings as above, but I always get false. void Start () { Debug.Log("supportsComputeShaders: " + SystemInfo.supportsComputeShaders); }
Answer by Bunny83 · Jul 04, 2017 at 09:40 PM
Well, do you actually test on an android device? You may want to check the ES 3.1 support of your device with an app like this. For example i have a Nexus 7 (2012) which only supports OpenGL ES 2.0. Your device need to support OpenGL ES 3.1 in order to support compute shaders.
The android API version is just a requirement but not a guarantee. If the hardware doesn't support it there's no way to make it work besides buying a more recent device that has support for ES 3.1
You can also try adding Vulkan as Graphics API.
I don't have any android device that supports ES 3.1 so i can't test it anywhere.
Hey,
I think I wans't clear enough, I'll update my description. What I meant is that the compute shaders don't work in editor if the target platform is Android. I didn't try on the actual android device yet since I can't make it work in editor.
Thanks
Well, if your editor hardware does support compute shaders but they simply doesn't work when the target is Android you should file a bug report as suggested here..
You may have a look at the bottom of this page. It might be possible that OpenGL ES 3.1 might not be supported by your PC hardware. What OS and hardware do you use?
I'm using Windows 10 and I have a GTX 1070. I guess I might not have support for OpenGL ES 3. Do you know if there's a way to force unity to use other rendering methods (the one I'm using when Windows is my target platform) while having Android as a selected Platform ?
Otherwise I can't work while I have Android as a selected platform :(
Answer by sbtp · Feb 08, 2019 at 12:44 PM
I had this problem in 2018.3. As @Okluckej mentioned in the comments. You need to turn off your Graphics Emulation under Edit > Graphics Emulation.
If you're on a Mac, there's an additional step. Turn on Metal Editor Support even if you are building for Android. It's in Player > Other Settings > Metal Editor Support.