Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Switching shaders versus disabling vertex attributes

4: Adsense

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   

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.






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.