John Kessenich | 41a36bb | 2013-06-19 05:41:25 +0000 | [diff] [blame] | 1 | #version 110 |
| 2 | |
John Kessenich | 7d58d65 | 2013-03-21 17:33:38 +0000 | [diff] [blame] | 3 | uniform vec4 bigColor; |
| 4 | varying vec4 BaseColor; |
| 5 | uniform float d; |
| 6 | |
| 7 | void bar(); |
| 8 | float foo(vec4); |
| 9 | float unreachableReturn(); |
| 10 | |
| 11 | void main() |
| 12 | { |
| 13 | vec4 color = vec4(foo(BaseColor)); |
| 14 | |
| 15 | bar(); |
| 16 | float f = unreachableReturn(); |
| 17 | |
| 18 | gl_FragColor = color * f; |
| 19 | } |
| 20 | |
| 21 | void bar() |
| 22 | { |
| 23 | } |
| 24 | |
| 25 | float unreachableReturn() |
| 26 | { |
| 27 | bar(); |
| 28 | if (d < 4.2) |
| 29 | return 1.2; |
| 30 | else |
| 31 | return 4.5; |
| 32 | } |
| 33 | |
| 34 | float foo(vec4 bar) |
| 35 | { |
| 36 | return bar.x + bar.y; |
| 37 | } |