[require] GLSL >= 1.20 [vertex shader] #version 120 void main() { gl_Position = gl_Vertex; } [fragment shader] #version 120 struct S { int i; float f; vec4 v[2]; }; uniform S s[2] = S[2](S(9, 33.3, vec4[2](vec4(1, 2, 3, 4), vec4(9, 8, 7, 6))), S(7, 22.2, vec4[2](vec4(5, 6, 7, 8), vec4(3, 2, 1, 0)))); void main() { vec4 color; if (s[0].i == 9 && s[0].f == 33.3 && s[0].v[0] == vec4(1, 2, 3, 4) && s[0].v[1] == vec4(9, 8, 7, 6) && s[1].i == 7 && s[1].f == 22.2 && s[1].v[0] == vec4(5, 6, 7, 8) && s[1].v[1] == vec4(3, 2, 1, 0)) { color = vec4(0, 1, 0, 1); } else { color = vec4(1, 0, 0, 1); } gl_FragColor = color; } [test] draw rect -1 -1 2 2 probe all rgb 0 1 0