Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#Actualkauna

Posted 14 March 2013 - 08:45 PM

If you support both instancing and non-instancing, you'll have to keep at least two different versions the vertex shaders + possible permutations. I decided some time ago, that all the meshes will be drawed with instancing even if there is only one instance of it. This way I don't have to have several shaders and I don't code for handling special case.

 

In my opinion, It is finally a question of optimization to handle the special case of "1" instance and maybe it could be put in the category of "premature optimization" or "unnecessary optimization". I don't think that you'll get any performance advantage to handle the special case. 

 

Cheers!


#1kauna

Posted 14 March 2013 - 06:05 AM

If you support both instancing and non-instancing, you'll have to keep at least two different versions the vertex shaders + possible permutations. I decided some time ago, that all the meshes will be drawing with instancing even if there is only one instance of it. This way I don't have to have several shaders and I don't code for handling special case.

 

In my opinion, It is finally a question of optimization to handle the special case of "1" instance and maybe it could be put in the category of "premature optimization" or "unnecessary optimization". I don't think that you'll get any performance advantage to handle the special case. 

 

Cheers!


PARTNERS