I wanted to try VFX graphs. I read that it uses compute shaders and compute shaders may not work in android devices. Like, not widely supported. Some partially supports it, some doesn’t support it at all. They’re old posts though. Is this still true in 2022?
And what really cause it? Hardware limitation? Device vendor support (such as drivers)? Android version? Unity itself?
Compute shader support begins at ES 3.1 and Vulkan (any version).
There isn’t a good reason to avoid compute shaders these days unless you are specifically targeting very old devices (but then you will be very limited with what you can do on there anyway).
There’s a “chicken and egg” problem with Android OpenGL (and Vulkan) drivers where the device manufacturers won’t put much effort on making sure less used features are implemented correctly and efficiently, and developers will avoid such features because they aren’t widely supported.
So, while compute shaders are required for GL ES 3.1, the drivers are not required to implement them well. You might find something works great on one device but has glitches in the same chipset from a different brand, and runs like crap on a supposedly better GPU from another manufacturer.
There’s a presentation somewhere on the URP team’s work on the URP deferred renderer. One of the slides shows that they got worse performance using compute on mobile across the board. Surprisingly, even iPhones were slower at running the same algorithm in compute versus a fragment shader.
Yes, I have found similar. But it’s probably pretty common to run faster in a fragment shader vs a compute shader, given that under the hood memory read and write optimizations can be made due to the inherent limitations with fragment shaders.
Yeah with the drivers, quite poor in a lot of cases, but it seems things are changing fast, with really good mobile chips becoming available for pretty cheap devices more and more frequently. Especially given that anyone developing a game/app rn doesn’t have to worry so much about current device availability, but about at-launch availability. The future is bright
It really depends on what your targets are. A game with poor performance or which outright crashes/black screens on a small but non-insignificant number of devices can tank our reviews pretty fast. It’s always wise to look what the top grossing games which are similar to your targets are/aren’t doing.
I see. How old are we talking about? I myself am using a 5 years old device.
Well that’s unfortunate. Seeing a lot of cheap devices with good hardware now I’m sure they are cutting a lot of edges in the software side.
Good chips, but do they have good drivers? I don’t know much about android under the hood, but AFAIK a hardware driver for an android device won’t just work for another device despite having the same hardware. At least not out of the box (I tried adreno driver). So I assume the brand plays a part in the driver making. However to provide cheap price they’ll have to cut corners in a lot of places, usually it includes software.