Maximum number of samplers in a custom glsl shader ?

Hello !

I’m currently learning custom glsl shader writing. I’m using “shader.setSampler(‘name’,value)” to get a texture from the textures tab (this value corresponding to the texture slot number). At beginning, everything works fine, but it seems that when this “value” is higher than 3, the shader doesn’t find the texture anymore (displays black instead).

Does it means that a custom glsl shader can use 4 textures maximum, or am i missing something ?
Did someone managed to make a custom glsl shader that use 5 textures or more ?

(blender 2.63, win7 32b)

Any help would be appreciated :spin:

With PrintGLInfo() you can display in the console how much textures your graphic card is supporting.
GLInfo.blend (101 KB)

Blender Game Engine Started
Supported Extensions...
 GL_ARB_shader_objects supported?       yes.
 GL_ARB_vertex_shader supported?        yes.
 ----------Details----------
  Max uniform components.4096
  Max varying floats.40
  Max vertex texture units.16
  Max combined texture units.16

 GL_ARB_fragment_shader supported?      yes.
 ----------Details----------
  Max uniform components.4096

 GL_ARB_texture_cube_map supported?     yes.
 ----------Details----------
  Max cubemap size.4096

 GL_ARB_multitexture supported?         yes.
 ----------Details----------
  Max texture units available.  8

 GL_ARB_texture_env_combine supported?  yes.
Blender Game Engine Finished

This doesn’t seem to bad, but I can’t use GLSL at all, maybe it is very, very bad, I haven’t got a clue, thanks HG1.

Well, it seems that my GPU take 4 textures maximum… Anyway, thank you for the tip !