blob: 5a5a203c32a529c13755a204f91a5cf4c89874fa [file] [log] [blame]
John Kessenichf6eae2a2016-01-22 17:47:22 -07001#version 140
John Kessenich39374da2015-05-15 21:32:46 +00002
John Kessenich6c292d32016-02-15 20:58:50 -07003in float blend;
4in vec4 u;
5bool p;
John Kessenich39374da2015-05-15 21:32:46 +00006
John Kessenichf6eae2a2016-01-22 17:47:22 -07007in vec2 t;
John Kessenich39374da2015-05-15 21:32:46 +00008
9void main()
10{
11 float blendscale = 1.789;
12
13 vec4 w = u;
14 vec4 w_undef; // test undef
15 vec4 w_dep = u; // test dependent swizzles
16 vec4 w_reorder = u; // test reordering
17 vec4 w2 = u;
18 vec4 w_flow = u; // test flowControl
19
20 w_reorder.z = blendscale;
21
22 w.wy = t;
23
24 w_reorder.x = blendscale;
25
26 w2.xyzw = u.zwxy;
27
28 w_reorder.y = blendscale;
29
30 w_dep.xy = w2.xz;
31 w_dep.zw = t;
32
33 w_undef.xy = u.zw;
34
35 if (p)
36 w_flow.x = t.x;
37 else
38 w_flow.x = t.y;
39
40 gl_FragColor = mix(w_reorder, w_undef, w * w2 * w_dep * w_flow);
41
42 vec2 c = t;
43 vec4 rep = vec4(0.0, 0.0, 0.0, 1.0);
44
45 if (c.x < 0.0)
46 c.x *= -1.0;
47
48 if (c.x <= 1.0)
49 rep.x = 3.4;
50
51 gl_FragColor += rep;
52}