Sign in to follow this  

Just some CG shader performance question...

This topic is 4833 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

Just so i know, is excecuting a shader that needs more parameters than others just as fast or slower (except from the calculations of course, just the startup time i mean)? I guess just as fast as afaik it's a state change and every shader can access the memory it's stored in but i'm not so sure. Anyone? If it's slower, how much slower is it (is it worth thinking about it)?

Share this post


Link to post
Share on other sites
I am not sure about a definite answer to your question, but you should be able to test it out for yourself fairly easily.

Share this post


Link to post
Share on other sites
Quote:
Original post by Tree Penguin
If it's slower, how much slower is it (is it worth thinking about it)?


If more states are required to be setup then it could be slower, however its certainly not worth worrying about, use as many parameters as you require, although packing them together as best you can helps general shader speed

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
At the moment i have no shader capable card and not even a c compiler. It will be a week before i get my own pc back so i am trying to gather as much information as i can and do as much as i can without actually compiling and running.
Never mind this thread, i don't think it will make that much of a difference.

Share this post


Link to post
Share on other sites
That was me btw.

phantom: that's what i meant, if packing values together is faster than just using seperate parameters, thanks.

Share this post


Link to post
Share on other sites

This topic is 4833 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this