2021-05-07 22:06:40 +00:00
|
|
|
uniform half4 testInputs; // equals (-1.25, 0, 0.75, 2.25)
|
2021-01-29 16:44:13 +00:00
|
|
|
uniform half4 colorGreen, colorRed;
|
|
|
|
|
2021-04-21 18:27:08 +00:00
|
|
|
half4 main(float2 coords) {
|
2021-05-07 22:06:40 +00:00
|
|
|
const half4 constVal = half4(-1.25, 0, 0.75, 2.25);
|
2021-01-29 16:44:13 +00:00
|
|
|
half4 expected = half4(-1, 0, 1, 1);
|
|
|
|
return (sign(testInputs.x) == expected.x &&
|
|
|
|
sign(testInputs.xy) == expected.xy &&
|
|
|
|
sign(testInputs.xyz) == expected.xyz &&
|
2021-05-07 22:06:40 +00:00
|
|
|
sign(testInputs.xyzw) == expected.xyzw &&
|
|
|
|
sign(constVal.x) == expected.x &&
|
|
|
|
sign(constVal.xy) == expected.xy &&
|
|
|
|
sign(constVal.xyz) == expected.xyz &&
|
|
|
|
sign(constVal.xyzw) == expected.xyzw) ? colorGreen : colorRed;
|
2021-01-29 16:44:13 +00:00
|
|
|
}
|