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