• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1uniform half4 colorGreen, colorRed;
2uniform half2x2 testMatrix2x2;
3uniform half3x3 testMatrix3x3;
4
5bool test_equality() {
6    bool ok = true;
7    ok = ok && testMatrix2x2 == half2x2(1,2,3,4);
8    ok = ok && testMatrix3x3 == half3x3(1,2,3,4,5,6,7,8,9);
9    ok = ok && testMatrix2x2 != half2x2(100);
10    ok = ok && testMatrix3x3 != half3x3(9,8,7,6,5,4,3,2,1);
11    return ok;
12}
13
14half4 main(float2 coords) {
15    return test_equality() ? colorGreen : colorRed;
16}
17