Page MenuHome

shader.setSampler: limited to 4 samplers
Closed, ResolvedPublic


there seems to be a limit of 4 samplers (shader.setSampler(name, 0 ... 3) works, but shader.setSampler(4) results in a "black" GLSL sampler, without any error message).

Experienced in Blender 2.68, on Win7.

Event Timeline

Please attach an example blend file demonstrating the problem.

Mitchell Stokes (moguri) triaged this task as 30 priority.Apr 17 2014, 5:19 AM
Bastien Montagne (mont29) changed the task status from Unknown Status to Unknown Status.Apr 24 2014, 8:39 AM
Bastien Montagne (mont29) claimed this task.

No answer in one week…

Here's a file that demonstrates this phenomenon:

It's just one image texture used as sampler2D in a custom GLSL shader, currently on index 3.
Pressing P to start the game engine should produce the following output:
Now if you move the texture down one channel and of course also change the code to use this index (shader.setSampler('name', 4)) the output is just black:
No errors are displayed in the system console.

Tested on Blender 2.75 and 2.73 official release version

I hope this is helpful,


Mitchell Stokes (moguri) changed the task status from Unknown Status to Unknown Status.Jul 21 2015, 6:35 PM
Mitchell Stokes (moguri) raised the priority of this task from 30 to 90.
Aaron Carlisle (Blendify) lowered the priority of this task from 90 to Normal.Jul 22 2015, 7:42 PM