John Stiles | b024549 | 2020-09-14 17:30:13 -0400 | [diff] [blame] | 1 | |
John Stiles | db42bf2 | 2020-09-15 16:09:11 -0400 | [diff] [blame] | 2 | out vec4 sk_FragColor; |
John Stiles | ed2baba | 2021-09-20 19:09:13 -0400 | [diff] [blame^] | 3 | uniform vec4 colorGreen; |
4 | uniform vec4 colorRed; | ||||
5 | vec4 main() { | ||||
6 | vec4 color; | ||||
7 | switch (int(colorGreen.y)) { | ||||
John Stiles | b024549 | 2020-09-14 17:30:13 -0400 | [diff] [blame] | 8 | case 0: |
John Stiles | ed2baba | 2021-09-20 19:09:13 -0400 | [diff] [blame^] | 9 | color = colorRed; |
John Stiles | d288d8b | 2021-09-20 21:56:26 +0000 | [diff] [blame] | 10 | break; |
John Stiles | b024549 | 2020-09-14 17:30:13 -0400 | [diff] [blame] | 11 | case 1: |
John Stiles | ed2baba | 2021-09-20 19:09:13 -0400 | [diff] [blame^] | 12 | color = colorGreen; |
John Stiles | d288d8b | 2021-09-20 21:56:26 +0000 | [diff] [blame] | 13 | break; |
John Stiles | b024549 | 2020-09-14 17:30:13 -0400 | [diff] [blame] | 14 | default: |
John Stiles | ed2baba | 2021-09-20 19:09:13 -0400 | [diff] [blame^] | 15 | color = colorRed; |
16 | break; | ||||
John Stiles | b024549 | 2020-09-14 17:30:13 -0400 | [diff] [blame] | 17 | } |
John Stiles | ed2baba | 2021-09-20 19:09:13 -0400 | [diff] [blame^] | 18 | return color; |
John Stiles | b024549 | 2020-09-14 17:30:13 -0400 | [diff] [blame] | 19 | } |