1uniform half4 colorRed, colorGreen; 2 3half4 main(float2 coords) { 4 bool ok = true; 5 6 int a = 1; 7 a = a + a; // 2 8 a += a; // 4 9 a = a + a; // 8 10 a += a; // 16 11 a = a + a; // 32 12 ok = ok && (a == 32); 13 14 int b = 10; 15 b = b - 2; // 8 16 b -= 2; // 6 17 b = b - 1; // 5 18 b -= 3; // 2 19 ok = ok && (b == 2); 20 21 int c = 2; 22 c = c * c; // 4 23 c *= c; // 16 24 c = c * 4; // 64 25 c *= 2; // 128 26 ok = ok && (c == 128); 27 28 int d = 256; 29 d = d / 2; // 128 30 d /= 2; // 64 31 d = d / 4; // 16 32 d /= 4; // 4 33 ok = ok && (d == 4); 34 35 return ok ? colorGreen : colorRed; 36} 37 38