2021-05-07 13:42:15 +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 13:42:15 +00:00
|
|
|
const half4 constVal = half4(-1.25, 0, 0.75, 2.25);
|
2021-01-29 16:44:13 +00:00
|
|
|
half4 expected = half4(-2, 0, 0, 2);
|
|
|
|
return (floor(testInputs.x) == expected.x &&
|
|
|
|
floor(testInputs.xy) == expected.xy &&
|
|
|
|
floor(testInputs.xyz) == expected.xyz &&
|
2021-05-07 13:42:15 +00:00
|
|
|
floor(testInputs.xyzw) == expected.xyzw &&
|
|
|
|
floor(constVal.x) == expected.x &&
|
|
|
|
floor(constVal.xy) == expected.xy &&
|
|
|
|
floor(constVal.xyz) == expected.xyz &&
|
|
|
|
floor(constVal.xyzw) == expected.xyzw) ? colorGreen : colorRed;
|
2021-01-29 16:44:13 +00:00
|
|
|
}
|