7 * This test exercises arrays indexed with a variable.
8 * We test with two arrays to be sure at least one is positioned
13 uniform int writeIndex;
14 uniform int readIndex;
21 a1[0] = vec4(0.0, 0.0, 0.0, 0.0);
22 a1[1] = vec4(0.0, 0.0, 0.0, 0.0);
23 a1[2] = vec4(0.0, 0.0, 0.0, 0.0);
24 a1[3] = vec4(0.0, 0.0, 0.0, 0.0);
25 a1[4] = vec4(0.0, 0.0, 0.0, 0.0);
27 a2[0] = vec4(0.0, 0.0, 0.0, 0.0);
28 a2[1] = vec4(0.0, 0.0, 0.0, 0.0);
29 a2[2] = vec4(0.0, 0.0, 0.0, 0.0);
30 a2[3] = vec4(0.0, 0.0, 0.0, 0.0);
31 a2[4] = vec4(0.0, 0.0, 0.25, 0.0);
33 gl_Position = gl_Vertex;
35 // write to the arrays
36 a1[writeIndex] = vec4(1.0, 0.25, 0.0, 1.0);
37 a2[writeIndex] = vec4(1.0, 0.25, 0.75, 1.0);
40 color = a1[readIndex] + a2[readIndex] + a2[4];
51 uniform int readIndex 1
52 uniform int writeIndex 1
54 relative probe rgb (0.0, 0.0) (1.0, 0.5, 1.0, 1.0)
55 relative probe rgb (1.0, 0.0) (1.0, 0.5, 1.0, 1.0)
56 relative probe rgb (0.0, 1.0) (1.0, 0.5, 1.0, 1.0)
57 relative probe rgb (1.0, 1.0) (1.0, 0.5, 1.0, 1.0)