• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 140
2
3in float blend;
4in vec4 u;
5bool p;
6
7in vec2 t;
8
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}
53