• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 450
2
3uniform sampler2D samp2D;
4in mediump vec2 coord;
5
6in vec4 u, w;
7out vec4 color;
8
9struct s1 {
10    int i;
11    float f;
12};
13
14struct s2 {
15    int i;
16    float f;
17	s1 s1_1;
18};
19
20layout(std140) uniform ub1 { s2 foo2a; } uName1;
21layout(std430) buffer  ub2 { s2 foo2b; } uName2;
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 (uName1.foo2a == uName2.foo2b)
31        v = texture(samp2D, coord);
32    else
33        v = texture(samp2D, 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	color =  v;
51}
52