1 uniform half4 colorGreen, colorRed;
6 const half4 one_splat = half4(1);
7 const half4 one_compound = half4(1, 1, 1, 1);
10 ok = ok && (half4(-1) == -one_splat);
11 ok = ok && (half4(-1, -1, -1, -1) == -one_splat);
12 ok = ok && (half4(-1) == -one_compound);
13 ok = ok && (half4(-1, -1, -1, -1) == -one_compound);
14 ok = ok && (-half4(1) == -one_splat);
15 ok = ok && (-half4(1, 1, 1, 1) == -one_splat);
16 ok = ok && (-half4(1) == -one_compound);
17 ok = ok && (-half4(1, 1, 1, 1) == -one_compound);
18 ok = ok && (half4(-1) == -one_compound);
19 ok = ok && (half4(-1) == -half4(-half2(-1), half2(1)));
20 ok = ok && (half4(1) != -half4(1));
21 ok = ok && (-half4(two) == half4(-two, half3(-two)));
22 ok = ok && (-half2(-one, one + one) == -half2(one - two, two));
23 ok = ok && (-1 * one == -one);
24 ok = ok && (-two == -1 * two);
25 ok = ok && (colorGreen.g * -1 == -colorGreen.g);
26 ok = ok && (-colorGreen == -1 * colorGreen);
33 const int4 one_splat = int4(1);
34 const int4 one_compound = int4(1, 1, 1, 1);
37 ok = ok && (int4(-1) == -one_splat);
38 ok = ok && (int4(-1, -1, -1, -1) == -one_splat);
39 ok = ok && (int4(-1) == -one_compound);
40 ok = ok && (int4(-1, -1, -1, -1) == -one_compound);
41 ok = ok && (-int4(1) == -one_splat);
42 ok = ok && (-int4(1, 1, 1, 1) == -one_splat);
43 ok = ok && (-int4(1) == -one_compound);
44 ok = ok && (-int4(1, 1, 1, 1) == -one_compound);
45 ok = ok && (int4(-1) == -int4(-int2(-1), int2(1)));
46 ok = ok && (int4(1) != -int4(1));
47 ok = ok && (-int4(two) == int4(-two, int3(-two)));
48 ok = ok && (-int2(-one, one + one) == -int2(one - two, two));
49 ok = ok && (-1 * one == -one);
50 ok = ok && (-two == -1 * two);
51 ok = ok && (-int(colorGreen.g) == -1 * int(colorGreen.g));
52 ok = ok && (int4(colorGreen) * -1 == -int4(colorGreen));
57 const float3x3 one_diagonal = float3x3(1);
58 const float3x3 one_compound = float3x3(1, 0, 0,
62 ok = ok && (float3x3(-1) == -one_diagonal);
63 ok = ok && (float3x3(-1, 0, 0, 0, -1, 0, 0, 0, -1) == -one_diagonal);
64 ok = ok && (float3x3(-1) == -one_compound);
65 ok = ok && (float3x3(-1, 0, 0, 0, -1, 0, 0, 0, -1) == -one_compound);
66 ok = ok && (-float3x3(1) == -one_diagonal);
67 ok = ok && (-float3x3(1, 0, 0, 0, 1, 0, 0, 0, 1) == -one_diagonal);
68 ok = ok && (-float3x3(1) == -one_compound);
69 ok = ok && (-float3x3(1, 0, 0, 0, 1, 0, 0, 0, 1) == -one_compound);
73 half4 main(float2 coords) {
74 return test_fvec() && test_ivec() && test_mat() ? colorGreen : colorRed;