Jump to content
  • Advertisement
Sign in to follow this  
laeuchli

TomF's Blog

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

Dear All(Esp TomF if he's browsing these boards again ;-)), I was just reading Tom's informative post on renderstate cost changes. Tom writes that one should "order by render targets". I took this to mean use the least number of targets, and dont render to one, switch to another, then switch back to rendering in the first(although this seems fairly common sense, and I dont see how one could get into that situation). Is this the correct reading, or is something more implied here? Regards, Jesse

Share this post


Link to post
Share on other sites
Advertisement
What he meant if he's you're rendering object A, B, C and you have say one rendertarget d for reflection and one rendertarget e for regular rendering and you need to have A, B and C visible on both then you do :

setRendertarget d (1)
render A
render B
render C
setRendertarget e (2)
render A
render B
render C


and you don't do :
setRendertarget d (1)
render A
setRendertarget e (2)
render A
render B
setRendertarget d (3)
render B
render C
setRendertarget e (4)
render C

even if both render of A share some renderstates. Because switching targets is considered the most costly of renderstates.

Then inside one rendertarget you sort by the other renderstates.. (and by depth, and by opacity etc..)

LeGreg

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!