blob: 5858ddaa0f16aab405d6e3cb72d262c63f624d81 [file] [log] [blame]
uniform half4 colorGreen, colorRed;
bool TrueTrue() {
int x = 1, y = 1;
if ((x == 1) && ((y += 1) == 2)) { // LHS true, RHS is executed and is true
return (x == 1 && y == 2);
} else {
return false;
}
}
bool TrueFalse() {
int x = 1, y = 1;
if ((x == 1) && ((y += 1) == 3)) { // LHS true, RHS is executed and is false
return false;
} else {
return (x == 1 && y == 2);
}
}
bool FalseTrue() {
int x = 1, y = 1;
if ((x == 2) && ((y += 1) == 2)) { // LHS false, RHS not executed but would be true
return false;
} else {
return (x == 1 && y == 1);
}
}
bool FalseFalse() {
int x = 1, y = 1;
if ((x == 2) && ((y += 1) == 3)) { // LHS false, RHS not executed but would be false
return false;
} else {
return (x == 1 && y == 1);
}
}
half4 main(float2) {
return TrueTrue() && TrueFalse() && FalseTrue() && FalseFalse() ? colorGreen : colorRed;
}