1#version 130
2
3uniform bool  u_b;
4uniform bvec2 u_b2;
5uniform bvec3 u_b3;
6uniform bvec4 u_b4;
7
8uniform int   u_i;
9uniform ivec2 u_i2;
10uniform ivec3 u_i3;
11uniform ivec4 u_i4;
12
13uniform float u_f;
14uniform vec2 u_f2;
15uniform vec3 u_f3;
16uniform vec4 u_f4;
17
18uniform bool  i_b;
19uniform bvec2 i_b2;
20uniform bvec3 i_b3;
21uniform bvec4 i_b4;
22
23flat in int   i_i;
24flat in ivec2 i_i2;
25flat in ivec3 i_i3;
26flat in ivec4 i_i4;
27
28in float i_f;
29in vec2 i_f2;
30in vec3 i_f3;
31in vec4 i_f4;
32
33void main()
34{
35    bool  b = u_b && i_b;
36    bvec2 b2 = bvec2(u_b2.x && i_b2.x && u_b2.y && i_b2.y);
37    bvec3 b3 = bvec3(u_b3.x && i_b3.x && u_b3.y && i_b3.y && u_b3.z && i_b3.z);
38    bvec4 b4 = bvec4(u_b4.x && i_b4.x && u_b4.y && i_b4.y && u_b4.z && i_b4.z && u_b4.w && i_b4.w);
39
40    int   i = u_i + i_i;
41    ivec2 i2 = u_i2 + i_i2;
42    ivec3 i3 = u_i3 + i_i3;
43    ivec4 i4 = u_i4 + i_i4;
44
45    float f = u_f + i_f;
46    vec2  f2 = u_f2 + i_f2;
47    vec3  f3 = u_f3 + i_f3;
48    vec4  f4 = u_f4 + i_f4;
49
50    gl_FragColor =
51        b ||
52        b2.x ||
53        b2.y ||
54        b3.x ||
55        b3.y ||
56        b3.z ||
57        b4.x ||
58        b4.y ||
59        b4.z ||
60        b4.w ? vec4(
61        i  +
62        i2.x +
63        i2.y +
64        i3.x +
65        i3.y +
66        i3.z +
67        i4.x +
68        i4.y +
69        i4.z +
70        i4.w +
71        f  +
72        f2.x +
73        f2.y +
74        f3.x +
75        f3.y +
76        f3.z +
77        f4.x +
78        f4.y +
79        f4.z +
80        f4.w) : vec4(1.0);
81}
82