iDevGames Forums
Major OpenGL performance increase - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html)
+--- Thread: Major OpenGL performance increase (/thread-2015.html)



Major OpenGL performance increase - smallstepforman - Dec 20, 2008 04:46 PM

Hi everyone.

Trying to squeeze as much performance from my game as possible, I've discovered that the biggest processing time sink for my application is due to the PVR scaling used by the pixel shader, specifically the texturing unit. The unit is very slow when stretching/shrinking textures. I've discovered that I had to manually tune the size of each object texture for the *typical* object view distance. For instance, if the object typically shows 100 pixels on screen, then I'm better off using a 128x128 texture vs using 64x64.

This alone had more impact on my frame rate than any clever geometry tricks and LOD algorithms I've used.

I originally minimised the size of my textures thinking that memory bandwidth would be a problem, however the scaling up of textures eats away all performance gained from reduced data sizes. Doubling the size of some of my textures has actually INCREASED the performance of my game.

Caveat emperor (what worked for me may not work for you, and vice versa). What I needed to do was benchmark each configuration and basically TUNE the texture sizes to match a typical scenario in my game. After tuning the texture sizes, I'm 12 fps faster in the primary game mode, but a few frames slower in cinematic modes. These are results I'm willing to accept.


Major OpenGL performance increase - Skorche - Dec 20, 2008 09:10 PM

Are you using mipmapping at all?


Major OpenGL performance increase - smallstepforman - Dec 21, 2008 11:01 PM

Yes, I do use mipmaps. As I've already pointed out, every application and camera angle is different, so what works for me may not work for others.