| uniform half4 colorGreen, colorRed; | |
| half4 main(float2) { | |
| bool ok = true; | |
| // Unary bitwise negation '~' (scalar): | |
| uint val = uint(colorGreen.r); // 0 | |
| uint2 mask = uint2(val, ~val); | |
| // Unary bitwise negation '~' (vector, uint): | |
| int2 imask = int2(~mask); | |
| // Unary bitwise negation '~' (vector, int): | |
| mask = ~mask & uint2(~imask); | |
| ok = ok && (mask == uint2(0)); | |
| return ok ? colorGreen : colorRed; | |
| } |