1#version 310 es
2precision mediump float;
3flat in uvec2 t;
4in float f;
5in vec2 tc;
6
7flat in uvec4 v;
8flat in int i;
9bool b;
10
11out uvec4 c;
12
13uniform mediump usampler2D usampler;
14
15void main()
16{
17    int count = 1;
18
19    uint u = t.y + 3u;
20    const uint cu1 = 0xFFFFFFFFU;
21    const uint cu2 = -1u;              // 0xFFFFFFFF
22    const uint cu3 = 1U;
23    const uint cu4 = 1u;
24
25    if (cu1 == cu2)
26        count *= 2;  // 2
27    if (cu3 == cu4)
28        count *= 3;  // 6
29    if (cu2 == cu3)
30        count *= 5;  // not done
31
32    const  int  cshiftedii      = 0xFFFFFFFF  >> 10;
33    const uint cushiftedui      = 0xFFFFFFFFu >> 10;
34    const  int  cshiftediu      = 0xFFFFFFFF  >> 10u;
35    const uint cushifteduu      = 0xFFFFFFFFu >> 10u;
36
37    if (cshiftedii == cshiftediu)
38        count *= 7;  // 42
39    if (cushiftedui == cushifteduu)
40        count *= 11; // 462
41    if (cshiftedii == int(cushiftedui))
42        count *= 13; // not done
43
44     int shiftedii      = 0xFFFFFFFF  >> 10;
45    uint shiftedui      = 0xFFFFFFFFu >> 10;
46     int shiftediu      = 0xFFFFFFFF  >> 10u;
47    uint shifteduu      = 0xFFFFFFFFu >> 10u;
48
49    if (shiftedii == shiftediu)
50        c = texture(usampler, tc);
51    if (shiftedui == shifteduu)
52        c = texture(usampler, tc + float(1u));
53    if (shiftedii == int(shiftedui))
54        c = texture(usampler, tc - vec2(2u));
55
56    if (t.x > 4u) {
57        float af = float(u);
58        bool ab = bool(u);
59        int ai = int(u);
60
61        c += uvec4(uint(af), uint(ab), uint(ai), count);
62    }
63
64    const uint cmask1 = 0x0A1u;
65    const uint cmask2 = 0xA10u;
66    const uint cmask3 = cmask1 << 4;
67    const uint cmask4 = 0xAB1u;
68
69    if (cmask3 == cmask2)
70        count *= 17;  // 7854
71
72    if ((cmask3 & cmask1) != 0u)
73        count *= 19; // not done
74
75    if ((cmask1 | cmask3) == cmask4)
76        count *= 23; // 180642
77
78    if ((cmask1 ^ cmask4) == 0xA10u)
79        count *= 27; // 4877334
80
81    uint mask1 = 0x0A1u;
82    uint mask2 = 0xA10u;
83    uint mask3 = mask1 << 4;
84    uint mask4 = 0xAB1u;
85
86    if (mask3 == mask2)
87        count *= 2;  // 9754668
88
89    if ((mask3 & mask1) != 0u)
90        count *= 3;  // not done
91
92    if ((mask1 | mask3) == mask4)
93        count *= 5;  // 48773340
94
95    if ((mask1 ^ mask4) == 0xA10u)
96        count *= 7;  // 341413380
97
98    c += uvec4(count);
99
100    #define UINT_MAX  4294967295u
101    c.x += UINT_MAX;
102}
103