| uniform half4 colorWhite; |
| |
| half4 ifElseTest(half4 colorBlue, half4 colorGreen, half4 colorRed) { |
| half4 result = half4(0); |
| if (colorWhite != colorBlue) { // TRUE |
| if (colorGreen == colorRed) { // FALSE |
| result = colorRed; |
| } else { |
| result = colorGreen; |
| } |
| } else { |
| if (colorRed != colorGreen) { // TRUE, but in a false branch |
| result = colorBlue; |
| } else { // FALSE, and in a false branch |
| result = colorWhite; |
| } |
| } |
| if (colorRed == colorBlue) { // FALSE |
| return colorWhite; |
| } |
| if (colorRed != colorGreen) { // TRUE |
| return result; |
| } |
| if (colorRed == colorWhite) { // FALSE |
| return colorBlue; |
| } |
| return colorRed; |
| } |
| |
| half4 main(float2) { |
| return ifElseTest(colorWhite.00b1, colorWhite.0g01, colorWhite.r001); |
| } |