Archived

This topic is now archived and is closed to further replies.

Foxman

Index Buffers or not, big performance boost?

Recommended Posts

Foxman    122
Here''s the situation: I''ve currently got a model being rendered with 4788 vertices using a regular ol'' vertex buffer, using 3 vertices per polygon, and I''m getting around 276 fps. So I tried to remove the duplicate vertices and use an index buffer instead. I failed slightly, coming up with all sorts of garbled polygons as a result, so instead tried to just use indices with the same size vertex array. The result: About 292 fps. Now, the question: Although I''m not removing any of the duplicate vertices from memory, they aren''t slowing down performance at all, are they? Just changing the indices is enough to get the speed boost by not transforming superfluous vertices, right? I think that''s how it works, unless I misunderstand index buffers. If I were to remove the duplicate verts from the vertex buffer completely, would the performance boost be any more? Thanks in advance.

Share this post


Link to post
Share on other sites
Mezz    571
Yes removing duplicate verts (if possible, it''s not always the case because you might need them for different texcoords at the same point) would increase speed as Nik02 said. Even better, stripifying your triangles would increase speed probably even more too.

-Mezz

Share this post


Link to post
Share on other sites
Nik02    4348
Yes, forgot to mention that.

And also, if your vertex format fits nicely to your card's geometry cache, you can get 5-10% more speed with that also. The cache amount and alignment is card-specific, however, and may require padding the vertex data, which results in more bandwith being used (which is bad).

Profile different approaches, see what works!

EDIT: usually the geometry cache alignment is multiples of 16.
See developer.nvidia.com or ati.com/developer for more info, don't know about other manufacturers...

[edited by - Nik02 on August 6, 2003 7:25:07 AM]

Share this post


Link to post
Share on other sites