Sign in to follow this  
laeuchli

TomF's Blog

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
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

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