Sign in to follow this  

which is faster?

This topic is 4304 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

I need to modify the verts and uv's for four verts per render scene a variable number of times. Which would be faster? 1. Re-Writing and lock the vertex buffer per render. or 2. calc simple vertex transform and also simple texture uv transform and use vertex shader to transform? Thanks for any advice, Devin

Share this post


Link to post
Share on other sites
It depends on the 'variable number times' value, however I would nearly definitely say that the second one is a faster. Locking you vertex buffer will make traffic on the bus and, in some special cases, can also cause the GPU stall(repair me here, if I am wrong :) ). In the vertex shader case you can also make some optimalization/additional tricks.

Share this post


Link to post
Share on other sites
Quote:
Original post by devronious
1. Re-Writing and lock the vertex buffer per render.

or

2. calc simple vertex transform and also simple texture uv transform and use vertex shader to transform?
I would reckon that #2 would be quicker as it doesn't require any resource modification.

Thing is, it's difficult for me or anyone to say conclusively if it'll be faster - these sorts of questions rely on a huge number of variables/characteristics.

With that in mind, i'd highly recommend you set up a PIX experiment and implement both systems. From the sounds of it, it shouldn't take you too long and you'll have a definitive answer that way [smile]

hth
Jack

Share this post


Link to post
Share on other sites
Thanks, I was thinking option two as well. I will try the pix. I haven't used it before but have heard it mentioned here several times, so perhaps it's time to look at it :)

Thanks for the re-assurance,

-Devin

Share this post


Link to post
Share on other sites

This topic is 4304 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