I'm rendering a lot of big images with alpha testing, and I'm hitting the fill rate.
If I change the texture format from RGBA8888 to RGBA4444 will the fill rate improve?
EDIT: Hardware is Iphone 3GS and OpenGL version 1.1Answer1:
Doing some tests I've found the following:<ul><li>Loading png as RGBA8888 I get 42fps</li> <li>Loading png as RGBA4444 I get 44fps</li> <li>Loading pvrtc2 I get 53 fps (and I had to double the texture size because it was not squared)</li> </ul>
It seems that changing from rgba8888 to rgba4444 does not improve framerate. But using pvrtc2 might do.Answer2:
You don't specify the particular hardware you're asking about, but Apple has <a href="http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesForWorkingWithTextureData/TechniquesForWorkingWithTextureData.html%23//apple_ref/doc/uid/TP40008793-CH104-SW1" rel="nofollow">this</a> to say about the PowerVR GPUs in iOS devices:<blockquote>
If your application cannot use compressed textures, consider using a lower precision pixel format. A texture in RGB565, RGBA5551, or RGBA4444 format uses half the memory of a texture in RGBA8888 format. Use RGBA8888 only when your application needs that level of quality.</blockquote>
While this will improve memory usage, I'm not sure that it will have a dramatic effect on fill rate. You might see an improvement from being able to hold more of the texture in cache at once, but I'd listen to Tommy's point about per-pixel operations being the more likely bottleneck here.
Also, when it comes to texture size, you'll get much better image quality at a smaller size by using texture compression (like PVRTC for the PowerVR GPUs) than lowering the precision of the texture pixel format.