• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1uniform half4 inputVal, expected;
2uniform half4 colorGreen, colorRed;
3
4half4 main(float2 coords) {
5    const half4 constVal = half4(1, 4, 16, 64);
6    const half4 negativeVal = half4(-1, -4, -16, -64);  // should not optimize away
7    return (sqrt(inputVal.x)       == expected.x     &&
8            sqrt(inputVal.xy)      == expected.xy    &&
9            sqrt(inputVal.xyz)     == expected.xyz   &&
10            sqrt(inputVal.xyzw)    == expected.xyzw  &&
11            sqrt(constVal.x)       == expected.x     &&
12            sqrt(constVal.xy)      == expected.xy    &&
13            sqrt(constVal.xyz)     == expected.xyz   &&
14            sqrt(constVal.xyzw)    == expected.xyzw  &&
15            sqrt(negativeVal.x)    == expected.x     &&
16            sqrt(negativeVal.xy)   == expected.xy    &&
17            sqrt(negativeVal.xyz)  == expected.xyz   &&
18            sqrt(negativeVal.xyzw) == expected.xyzw) ? colorGreen : colorRed;
19}
20