specifying samplers in shader

could someone remind me again why we can’t set the integer value of a sampler directly in the shader, in the same way we can specify the generic vertex attribute slot of an input, and the uniform buffer binding index?

Because you didn’t read far enough in the ARB_shading_language_420pack extension? You know, the part where it says that this is legal:


layout(binding = 0) uniform sampler2D myTextureUsesUnit0;

I don’t know how you missed that, since it is literally right after the part where it says you can do this same thing with uniform blocks…

Either that, or you’re running into a driver bug.