Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

JulianSpillane

Cost of Binding Fragment Programs

This topic is 5306 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all. Sorry for posting so much. Anyways, I have yet another fragment program related question. How much does it cost (speed-wise) to bind fragment programs? I''m only asking because I''m using a vp/fp combo to perform cel-shading, and I''m currently binding and unbinding for each object. Would it cost less to simply bind once, then render all of the objects that need to be cel-shaded, then to unbind it? I''m trying to extract max performance, that''s why I''m being so nitpicky. Thanks a lot! Best Regards, Julian Spillane

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I haven''t heard anything about the binding itself being costly, but if you''re looking for maximum performance I suppose you should sort the objects by shader-usage, as you would normally do by material. Or both at the same time, if possible
The general rule is to keep state-changes to a minimum, so sort/group whatever is similar.

Share this post


Link to post
Share on other sites
Even if the operation its self isnt very slow you should still remove redundant changes like the AP says, anything else is just a waste of time processor/gpu wise

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!