Jump to content
  • Advertisement
Sign in to follow this  
adityav89

Directx basic transformations

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

Hello people, I have a very basic doubt , When we transform(ie.translate,rotate,scale) any object/point in d3d it comes back to its original pos. unless we continuously transform so is it more effecient than replacing all co-ordinates in the buffer or just transform from the first location by changing the values in the WORLD transform pipeline

Share this post


Link to post
Share on other sites
Advertisement
If your data isn't going to change at all, then you can pre-process the vertices by multiplying each vertex by the world matrix (And view and projection matrices if they're remaining the same too). However, since most vertex transforms are done on the GPU these days, it's unlikely to give you any noticeable performance increase, and may actually cause poorer performance since you'll need multiple copies of the data if you have multiple instances of the model at different coordinates.

In short - you can do it, but it's probably best to just transform the vertices each frame, unless you've profiled it and found that it's a problem.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!