blob: a0450dca9c09b56533fefad818e5ef3ae6571b75 [file] [log] [blame]
John Kessenich2f21fcc2015-06-17 16:15:09 +00001#version 130
2
3uniform sampler2D sampler;
4varying mediump vec2 coord;
5
6varying vec4 u, w;
7
8struct s1 {
9 int i;
10 float f;
11};
12
13struct s2 {
14 int i;
15 float f;
16 s1 s1_1;
17};
18
19uniform s1 foo1;
20uniform s2 foo2a;
21uniform s2 foo2b;
22
23void main()
24{
25 vec4 v;
26 s1 a[3], b[3];
27 a = s1[3](s1(int(u.x), u.y), s1(int(u.z), u.w), s1(14, 14.0));
28 b = s1[3](s1(17, 17.0), s1(int(w.x), w.y), s1(int(w.z), w.w));
29
30 if (foo2a == foo2b)
31 v = texture2D(sampler, coord);
32 else
33 v = texture2D(sampler, 2.0*coord);
34
35 if (u == v)
36 v *= 3.0;
37
38 if (u != v)
39 v *= 4.0;
40
41 if (coord == v.yw)
42 v *= 5.0;
43
44 if (a == b)
45 v *= 6.0;
46
47 if (a != b)
48 v *= 7.0;
49
50 gl_FragColor = v;
51}