Sign in to follow this  

max number of shaders on a gpu?

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

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
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

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