hmwill":3hstjvyx]
[quote="rcp wrote:
Nearly all of our big performance increases came in reducing triangle setup and associated overhead. We had plenty of memory available, so LOD was a huge help as well.
Was this on Pocket PCs? Daniel (drgoldie) seems to have identified rasterization as the main bottleneck at least for his implementation (klimt)... At the same time, obviously any triangle that's not going to be set up will not go into the rasterizer either.
Intel had an article on 3d ["3D Graphics Optimizations for Intel® PCA Applications
Processors with Intel® XScale™ Technology"], and for their implementation they give the following numbers (whatever "typical workload for a game engine" may be):
Scanline 46%
TriSetup 17%
Culling 12%
Clipping 9%
Xform 6%
- Martin
Our game is a pool game. The walls are big polys so the numbers Intel claims are probably pretty correct. The table, stick and balls are very small polys and those numbers are inverted. If a triangle is reduced to two or three pixels, then TriSetup and everything above is going to have taken much more time. For example, if a triangle is 2 pixels, the grand total of the rasterization process might be a memory read and store.... two instructions.
None of this is anything new, software renderers have always had to worry about small triangles. Towards the end of Abrash's Black Book he talks about how he and Carmack came up with a special path for small triangles. I believe it was a subdivision method. At the time it was a big increase for them and they used it for character models at a distance. I do believe, however, that they later had the normal path so optimized that it really didn't matter which path was taken.
BTW, now that I look at Intel's number some more... those look pretty wacky. I assume by 'culling' they mean front or backface culling.... if so, there is no way that takes 17% of the time. You can pretty much get that for free in TriSetup. I almost wonder if those number are cumulative....
Cheers,
rcp