Jump to content
  • Advertisement
Sign in to follow this  
ade-the-heat

max number of shaders on a gpu?

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

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
Advertisement
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
Sign in to follow this  

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