• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1uniform half4 testInputs;
2uniform half4 colorGreen, colorRed;
3
4half4 main(float2 coords) {
5    half4 expected = half4(-1.5625, 0, 0.75, 3.375);
6    const half4 constVal  = half4(-1.25, 0, 0.75, 2.25);
7    const half4 exponents = half4(2, 3, 1, 1.5);
8    return (pow(testInputs.x,    exponents.x)    == expected.x     &&
9            pow(testInputs.xy,   exponents.xy)   == expected.xy    &&
10            pow(testInputs.xyz,  exponents.xyz)  == expected.xyz   &&
11            pow(testInputs.xyzw, exponents.xyzw) == expected.xyzw  &&
12            pow(constVal.x,      exponents.x)    == expected.x     &&
13            pow(constVal.xy,     exponents.xy)   == expected.xy    &&
14            pow(constVal.xyz,    exponents.xyz)  == expected.xyz   &&
15            pow(constVal.xyzw,   exponents.xyzw) == expected.xyzw) ? colorGreen : colorRed;
16}
17