Sign in to follow this  
ade-the-heat

max number of shaders on a gpu?

Recommended Posts

For my app I'm looking at having about 30 fragment shaders. Is there an upper limit on the number of shaders and if so how do I find it ? cheers Ade

Share this post


Link to post
Share on other sites
What do you mean with having 30 shaders?

You can have n shaders but there is always just one vertex- and one pixelshader active when drawing.
So you have to choose the correct shader for each render pass.

You can combine the output of different shaders by using multiple render passes.

Greetings
Jan

Share this post


Link to post
Share on other sites
Nope there is no upper limit! ;)

I am having around 25 different shaders for different things.
Although I am using just 4 or 5 at the moment with different textures and parameters.

Share this post


Link to post
Share on other sites
well its not infinitive
but 30 should be no problems, ive had over 200 running

Share this post


Link to post
Share on other sites
it is bound on the vram as long u have space u can make as many as u can.

Share this post


Link to post
Share on other sites
If you are really interested in the max number, it should be good old 2^32-1

Just like you can create 2^32-1 textures
2^32-1 display lists
2^32-1 VBO
2^32-1 FBO

and so on.

You will know you have reached the maximum when you get GL_OUT_OF_MEMORY

Share this post


Link to post
Share on other sites

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