Jump to content
  • Advertisement
Sign in to follow this  
devronious

which is faster?

This topic is 4591 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!