2021-01-29 16:44:13 +00:00
|
|
|
uniform half4 testInputs;
|
|
|
|
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
|
|
|
int4 expected = int4(1, 0, 0, 2);
|
|
|
|
return (abs(int4(testInputs).x) == expected.x &&
|
|
|
|
abs(int4(testInputs).xy) == expected.xy &&
|
|
|
|
abs(int4(testInputs).xyz) == expected.xyz &&
|
2021-05-07 22:06:40 +00:00
|
|
|
abs(int4(testInputs).xyzw) == expected.xyzw &&
|
|
|
|
abs(int4(constVal).x) == expected.x &&
|
|
|
|
abs(int4(constVal).xy) == expected.xy &&
|
|
|
|
abs(int4(constVal).xyz) == expected.xyz &&
|
|
|
|
abs(int4(constVal).xyzw) == expected.xyzw) ? colorGreen : colorRed;
|
2021-01-29 16:44:13 +00:00
|
|
|
}
|