Jump to content

  • Log In with Google      Sign In   
  • Create Account

Switching shaders versus disabling vertex attributes


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 ill   Members   -  Reputation: 320

Like
0Likes
Like

Posted 13 February 2013 - 03:20 PM

I hear switching shaders isn't very good for performance, so it's good to sort by things like shaders and textures from what I understand.

 

Now one example is if I have meshes that are animated with skeletal animation and hardware skinning, and some meshes that aren't.  If I want to apply the same material to two meshes, one animated and one isn't.  Is it better to have two shaders that do the exact same thing, where the only difference is I have skeletal animation code and data being sent?

 

I'm working on a material system, and Ideally I'd like the material properties to not be concerned if the material will be applied to a skeletal mesh, billboarded particle, etc...  The material system creates shaders depending on certain properites, and there also happen to be these additional options that need to be considered.



Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS