6 // Check that sampler arrays can be indexed with non-constant expressions.
8 // The GLSL 1.10 and 1.20 specs place no restriction on how arrays of samplers
9 // may be indexed. The restriction was added in GLSL 1.30.
11 // From page 106 (112 of PDF) of GLSL ES 1.00 spec:
13 // GLSL ES 1.00 supports both arrays of samplers and arrays of structures
14 // which contain samplers. In both these cases, for ES 2.0, support for
15 // indexing with a constant integral expression is mandated but support
16 // for indexing with other values is not mandated.
18 // This test should work on GLSL ES 1.00, but it is not required to.
21 precision mediump float;
24 varying vec2 tc[gl_MaxTextureImageUnits];
25 uniform sampler2D s[gl_MaxTextureImageUnits];
30 for (int i = 0; i < gl_MaxTextureImageUnits; i++)
31 c += texture2D(s[i], tc[i]);