Major OpenGL performance increase

Posts: 32
Joined: 2008.10
Post: #1
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.
Quote this message in a reply
Posts: 1,487
Joined: 2002.09
Post: #2
Are you using mipmapping at all?

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Posts: 32
Joined: 2008.10
Post: #3
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.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Increase skill level button dunhill68 12 10,151 Jan 8, 2010 02:57 PM
Last Post: dunhill68
  OpenGL ES Performance Question Nick 3 4,303 Jan 29, 2009 11:53 PM
Last Post: Nick
  OpenGL performance degrade smallstepforman 1 3,504 Dec 20, 2008 11:06 AM
Last Post: Skorche