blob: 0a71521eec98e86cf58f30c346ce7f6aa4fb35cd [file] [log] [blame]
John Kessenichf6eae2a2016-01-22 17:47:22 -07001#version 140
John Kessenich39374da2015-05-15 21:32:46 +00002
3precision mediump float;
4
John Kessenich6c292d32016-02-15 20:58:50 -07005in vec4 bigColor;
John Kessenichf6eae2a2016-01-22 17:47:22 -07006in vec4 BaseColor;
John Kessenich6c292d32016-02-15 20:58:50 -07007in float d;
John Kessenich39374da2015-05-15 21:32:46 +00008
9void bar();
10float foo(vec4);
11float unreachableReturn();
12
13void main()
14{
15 vec4 color = vec4(foo(BaseColor));
16
17 bar();
18 float f = unreachableReturn();
19
20 gl_FragColor = color * f;
21}
22
23void bar()
24{
25}
26
27float unreachableReturn()
28{
29 bar();
30 if (d < 4.2)
31 return 1.2;
32 else
33 return 4.5;
34}
35
36float foo(vec4 bar)
37{
38 return bar.x + bar.y;
39}