John Kessenich | f6eae2a | 2016-01-22 17:47:22 -0700 | [diff] [blame] | 1 | #version 140
|
John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 2 |
|
| 3 | precision mediump float;
|
| 4 |
|
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 5 | in vec4 bigColor;
|
John Kessenich | f6eae2a | 2016-01-22 17:47:22 -0700 | [diff] [blame] | 6 | in vec4 BaseColor;
|
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 7 | in float d;
|
John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 8 |
|
| 9 | void bar();
|
| 10 | float foo(vec4);
|
| 11 | float unreachableReturn();
|
| 12 |
|
| 13 | void main()
|
| 14 | {
|
| 15 | vec4 color = vec4(foo(BaseColor));
|
| 16 |
|
| 17 | bar();
|
| 18 | float f = unreachableReturn();
|
| 19 |
|
| 20 | gl_FragColor = color * f;
|
| 21 | }
|
| 22 |
|
| 23 | void bar()
|
| 24 | {
|
| 25 | }
|
| 26 |
|
| 27 | float unreachableReturn()
|
| 28 | {
|
| 29 | bar();
|
| 30 | if (d < 4.2)
|
| 31 | return 1.2;
|
| 32 | else
|
| 33 | return 4.5;
|
| 34 | }
|
| 35 |
|
| 36 | float foo(vec4 bar)
|
| 37 | {
|
| 38 | return bar.x + bar.y;
|
| 39 | }
|