Sign in to follow this  

Speed delta between Strips and Triangles

This topic is 4096 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well I don't know what to say but in my terrain rendering I been using strips, and decided to give triangles a shot and see really no difference in speed at best may be 1-3fps. Yes I am using VBO's and a IBO. I have 6 indices per quad for my triangle list and with strip I do have degenerate triangles. This is on a 7800GT... AFAIK if I am fillrate limited then this will not show any speed ups?

Share this post


Link to post
Share on other sites
Since you're already storing your vertex data on the video card, there's no real speedup to be obtained through vertex strips. It'd be different if the vertices weren't indexed, and were being dynamically generated. What you should REALLY worry about is ordering your vertices in a cache-friendly way.

Share this post


Link to post
Share on other sites
Just for everyones FYI I removed my bottleneck that causes my fillrate to go up and still no delta between the two methods. What order do you recommend then Sneftel? Thanks

Share this post


Link to post
Share on other sites
EDIT: nevermind, I misread. Well, check this out. Though it might be tricky to apply to terrains; I don't have much experience with that.

Share this post


Link to post
Share on other sites
To Promit, I am assuming this is more aimed at strips and not lists? Due to you were talking about strips with your posting.

What kind of speed up could one expect to see if the indices were cache friendly?

BTW I am using a patching system with 17x17 patch sizes...

Share this post


Link to post
Share on other sites
Think of it this way:

If you have a 17x17 block of vertices to render a 16x16x2 block of triangles:

With an ideal strip, you get one triangle per transformed vertex, plus two vertices per row of triangles. That makes for 16x16x2+16x2 transformed verts to render the block.

With an ideally sorted vertex cache optimized list, you can get much better than one triangle per transformed vert, because some triangles use all three vertices out of the post-transform cache. Thus, you only need to transform 17x17 vertices.

Thus, a triangle list, with an ideal vertex cache, is faster than a triangle strip. However, you could sort the strip, too, and get pretty much the same performance between the two.

I would just go with lists and not worry about it.

Share this post


Link to post
Share on other sites
This is the code I am using to create the list


for(z = startz; z < endz-1; ++z)
{
for(x = startx; x < endx-1; ++x)
{
triBuff[currentIndex++] = x + (z * mapData.map_X);
triBuff[currentIndex++] = x + ((z + 1) * mapData.map_X);
triBuff[currentIndex++] = x + 1 + (z * mapData.map_X);

triBuff[currentIndex++] = x + 1 + (z * mapData.map_X);
triBuff[currentIndex++] = x + ((z + 1) * mapData.map_X);
triBuff[currentIndex++] = x + 1 + ((z + 1) * mapData.map_X);
}
}

Share this post


Link to post
Share on other sites

This topic is 4096 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this