How do I draw a background image *fast* (on Android)?

In our Android game, drawing a full-screen background image causes a drop of about 10 FPS (from 30-50 to about 20-40 FPS) on the actual device (not on PC, where the game run around 70 FPS). [These are all measured in my own code, it's not the FPS reported by the stats tool].

I have tried various strategies, with the same result:

  • using a diffuse material on a built-in Unity plane and a custom generated plane
  • using SpriteManager
  • drastically reducing the texture size, with compression
  • multiple smaller planes that collectively fill the plane

and a few other (stupid) things as well. The texture is 512x512, but I have also tried 64x64 with the same result.

The frame rate drop is less severe for smaller planes, and for very small planes is insignificant, so it looks like it really is just the number of pixels that I draw that affect this.

So first, is this just the way it is, or am I doing something obvious wrong?

Second, is there anything I can do to get a background in without the drop in speed?

Well, we got the background rendering down from 10 FPS to 5 FPS by changing shaders to ones that ignore lighting. A rather obvious solution.

We were also having this problem more recently on Android. In case anyone else finds this we found that having multiple “background elements” eg. a picture and then other images that change per level but are all effectively background elements that you can use a RenderTexture to “screenshot” a dynamically built background and then get rid of all the other background elements. The Rendertexture should (as above) have a shader that ignores lighting. Just make sure to test it on several test devices if you are doing mobile.