Quote:
Originally Posted by Rubicon
No offense here, we've never been able to figure out what our core fps issue is.
Our game doesn't have a bad frame rate but it's always been lower than what my gut tells me it should be. We've spent weeks with various analysers trying all the tricks - 1x1 textures, "just colour" shaders, drawing cubes instead of models etc. etc. There's no newbie mistakes in our engine, it just draws a shitload of stuff.
Are you using "packed" vertex formats? One thing we've never tried it making them "worse" by using floats for normals instead of an U8 type etc.
|
I use packed formats. Using floats and such will destroy the framerate.
Mutant Storm is very efficient to collapse draw calls into each other. But one of the biggest gains that worked for me for dynamic changes to vertices was to have one vertex buffer pool that gets mapped at the beginning of the frame and gets filled. Also I don't use the hardware for skinning or lighting and use the CPU for that - the CPU is not the real issue here... By grouping all the textures into one giant texture atlas you can draw most of the geometry with a few draw calls, using the same state changes. Internally the GPU is not doing many state changes and by doing this it can run very efficiently.
Alpha polygons use a very nice trick I picked up from Luke Ryan when I was at True Axis. Normally you want to use 2 different blend states to simulate dark or light effects. You can build the blend modes/math into the texture data and vertex colour data and just set a certain blend mode up on initialisation. Then have all your alpha textures into a supper texture atlas that will cope with the light and dark effects. You still have to sort them but CPU power is fine on the iPad3 and just draw all alpha with one draw call. That way the GPU can run without state changes while processing alpha.
This is only a gloss over but the outlines above will boost performance through the roof. In other words you need to think of better ways to collapse state changes into each other for full Retina displays. Mutant Storm draws everything between 14 to 20 draw calls.