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