Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


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