Perfomance for Mobile

Hi folks,

you know what settings I have to make to get the best perfomance for Mobile? My currently settings are lagging on my Galaxy S2

I switch the Shader to “Mobile/Diffiuse”. Is there another point, that is important?

Greetings

As GPU on mobile devices are weaker, its highly suggested that you use the simplest shaders available that results in good or acceptable quality. There are lots of possible causes for lag - from scripts to rendering, but the ones I did cross most often in practical life:

  • Diffuse shaders can be changed to unlit shaders if you are not using lights. Also, each object lit by a light will require an extra draw call to be rendered.
  • Textures sizes have a really big impact on performance. I think that is because mobile devices gpus lack dedicated memory (I am not sure). However, making your textures as small as you can (in sizes of potencies of two) may speed up rendering. Try playing with the mipmap settings, too.
  • Reducing draw calls often improves performance. Only once I had slower execution time be reducing draw calls. There are many techniques to reduce draw calls to be listed here.
  • This one is on cpu side. Moving Game Objects with a static collider attached, and no kinematic rigid body attached on same object. Figured out that the overhead can be a killer.
  • Garbage Collector.

There are more techniques than I can list here. Examples:

Happy optimizing =D. Also, if you’re able to, always profile before optimizing. If you’re not, try to determine bottlenecks by testing. Programmers have horrible intuition on what and where are the bottlenecks.