In a fragment shader, why can’t I use a flat input integer to index a uniform array of sampler2D?

[…] but can’t use it to index an array of samplers as expected because compiler sees it as “non-constant” […] In GLSL up to version 3.30 respectively GLSL ES up to version 3.00, the index of an array of texture samplers has to be a constant expression: GLSL 3.30 Specification – 4.1.7 Samplers (page 21) … Read more