Archived

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

JulianSpillane

Cost of Binding Fragment Programs

Recommended Posts

JulianSpillane    122
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
Guest Anonymous Poster   
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