John Kessenich | f6eae2a | 2016-01-22 17:47:22 -0700 | [diff] [blame] | 1 | #version 310 es |
John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 2 | |
3 | lowp float foo(); | ||||
4 | |||||
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 5 | in lowp float low, high; |
John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 6 | |
7 | lowp float face1 = 11.0; | ||||
8 | |||||
John Kessenich | f6eae2a | 2016-01-22 17:47:22 -0700 | [diff] [blame] | 9 | out lowp vec4 Color; |
10 | |||||
John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 11 | void main() |
12 | { | ||||
13 | int z = 3; | ||||
14 | |||||
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 15 | if (2.0 * low + 1.0 < high) |
John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 16 | ++z; |
17 | |||||
John Kessenich | f6eae2a | 2016-01-22 17:47:22 -0700 | [diff] [blame] | 18 | Color = face1 * vec4(z) + foo(); |
John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 19 | } |
20 | |||||
21 | lowp float face2 = -2.0; | ||||
22 | |||||
23 | lowp float foo() | ||||
24 | { | ||||
25 | // testing if face2 initializer insert logic is correct in main | ||||
26 | return face2; | ||||
27 | } |