Is it possible that a lot of polygons being drawn on the screen on top of each other (overdraw) can significantly slow the performance EVEN if those polygons were (theoretically) completely transparent with ALPHA_TEST on so that they were not being rendered at all? As strange as this sounds it is relevant to my game…
If those polygons are modulated by colour and have zero alpha and no other funny business going like stencils and depth writes, the driver might just toss them out but as it’s generally a complete waste of time drawing such polygons, the driver is unlikely to bother optimising this situation.
It’ll still be better than a read-modify-write operation as the alpha test occurs before the read, so expect it to be much, much faster in any case.
Cas
hmmm
well i’ve done some tests and overdraw is the slowdown factor. So is there any way to tell OpenGL to precompute the pixels and send only the necessary partial polygons to the graphics card rather than numerous whole ones, maybe?
You could try using a model or cutout that fits better with you textures. So that the transparent areas of the texture is not mapped to the triangles, and will not be drawn. There will be more triangles, butt less overdraw.
So instead of using a quad, use a set of triangles that closely fits the opaque parts of the texture. Hope you understand, kind of hard to explain