Jump to content
  • Advertisement
Sign in to follow this  

use more than 4 Textures with GLSL

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

Hi, I wrote an GLSL shader in RenderMonkey and used 5 Textures. It works fine in RenderMonkey but I'm not able to get the fifth texture into the shader with my own code. AFAIK the fixed function pipeline has only support for 4 textures, so mabye that's the problem? I'm using a gf7800 GTX.

Share this post

Link to post
Share on other sites
Read here:


The maximum available multi-texture stages (to the fixed-function
pipeline) are MAX_TEXTURE_UNITS. A fragment shader has access to at
least MAX_TEXTURE_UNITS texture image units, and possibly more, up to
or greater than MAX_TEXTURE_UNITS.

The fixed-function pipeline may report MAX_TEXTURE_UNITS as 4, while in a shader the MAX_TEXTURE_IMAGE_UNITS_ARB may be 16 and MAX_TEXTURE_COORDS_ARB may be 8. So your shader should have access to more than 4 textures.

Make sure that you set the values of the uniform samplers to the correct texture units as well.

[Edited by - nmi on April 22, 2007 8:43:49 AM]

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!