Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#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