• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1uniform half4 inputA, inputB;
2uniform half4 colorGreen, colorRed;
3
4half4 main(float2 coords) {
5    const half4 constValA = half4(1, 2, 3, 4);
6    const half4 constValB = half4(5, 6, 7, 8);
7    half4 expected = half4(5, 17, 38, 70);
8
9    return (dot(inputA.x,       inputB.x)       == expected.x &&
10            dot(inputA.xy,      inputB.xy)      == expected.y &&
11            dot(inputA.xyz,     inputB.xyz)     == expected.z &&
12            dot(inputA.xyzw,    inputB.xyzw)    == expected.w &&
13            dot(constValA.x,    constValB.x)    == expected.x &&
14            dot(constValA.xy,   constValB.xy)   == expected.y &&
15            dot(constValA.xyz,  constValB.xyz)  == expected.z &&
16            dot(constValA.xyzw, constValB.xyzw) == expected.w) ? colorGreen : colorRed;
17}
18