• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1uniform half4 colorGreen, colorRed;
2uniform float2x2 testMatrix2x2;
3uniform half3x3 testMatrix3x3;
4
5half4 main(float2 coords) {
6    half2x2 h22 = matrixCompMult(half2x2(5, 5, 5, 5), half2x2(0, 1, 2, 3));
7    const half4x4 h44 = matrixCompMult(half4x4(0.5), half4x4(1, 2, 3, 4,
8                                                             5, 6, 7, 8,
9                                                             9, 10,11,12,
10                                                             13,14,15,16));
11    float2x2 f22 = matrixCompMult(testMatrix2x2, float2x2(1));
12    half3x3 h33 = matrixCompMult(testMatrix3x3, half3x3(2,2,2,2,2,2,2,2,2));
13    return (h22 == half2x2(0, 5, 10, 15) &&
14            f22 == float2x2(1, 0, 0, 4) &&
15            h33 == half3x3(2, 4, 6, 8, 10, 12, 14, 16, 18) &&
16            h44 == half4x4(0.5, 0, 0, 0, 0, 3, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 8))
17                ? colorGreen : colorRed;
18}
19