You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
720 B

uniform half4 testInputs; // equals (-1.25, 0, 0.75, 2.25)
uniform half4 colorGreen, colorRed;
half4 main(float2 coords) {
const half4 constVal = half4(-1.25, 0, 0.75, 2.25);
half4 expected = half4(0, 0, 0.75, 1);
return (saturate(testInputs.x) == expected.x &&
saturate(testInputs.xy) == expected.xy &&
saturate(testInputs.xyz) == expected.xyz &&
saturate(testInputs.xyzw) == expected.xyzw &&
saturate(constVal.x) == expected.x &&
saturate(constVal.xy) == expected.xy &&
saturate(constVal.xyz) == expected.xyz &&
saturate(constVal.xyzw) == expected.xyzw) ? colorGreen : colorRed;
}