Looking for a good+solid implementation of TomF's vertex-cache-optimization algorithm
Members - Reputation: 119
Posted 31 October 2012 - 04:01 AM
I'm coding for modern CPU's.
But the meshes I'm sending to the graphics card are pretty much directly output from Maya. I guess they will have poor vertex-cache-ordering.
I'm hoping to use a vertex-cache-optimization pre-pass on the meshes to gain some performance. As suggested here
Does anyone know of the best technique to use on modern cards? Is it still Toms algorithm? The models I have to render have 1,000,000+ triangles. :(
So I would like the pre-pass to run fast, as well as produce good results. ( like Toms algorithm )
Does anyone know of a solid and good implementation of Toms algorithm? The ones I'm finding on the internet seem to be from junior/hobby programmers who are not writing the most efficient code.
Members - Reputation: 713
Posted 31 October 2012 - 04:04 AM
I think you can find code here: http://rosario3d.wordpress.com/2011/06/19/triangle-render-order-optimization/
(Not really read it, just did remember having seen it, I implemented it myself once it wasn't difficult.)
Edited by Ingenu, 31 October 2012 - 04:06 AM.
Moderators - Reputation: 8509
Posted 31 October 2012 - 12:10 PM
Strictly speaking, an algorithm like TomF's is no longer the absolute best way to optimize for a high-end modern GPU. This is because newer GPU's have multiple hardware units for setting up triangles, which means triangles will get processed concurrently rather than in sequential order. But optimizing for this would require specific knowledge of how the hardware splits up triangles among its hardware units, so it's probably not practical unless you're targeting a specific GPU or family of GPU's. Either way you can still get gains out of the older optimization methods, so it's still worth doing.