1uniform half4 testInputs; // -1.25, 0, 0.75, 2.25 2uniform half4 colorGreen, colorRed; 3 4half4 main(float2 coords) { 5 const float4 expectedA = half4(-1.0, 0.0, 1.0, 2.0); 6 7 const float4 constVal = half4(-6.75, -0.475, 3.5, 2.5); 8 const float4 expectedB = half4(-7.0, -0.0, 4.0, 2.0); 9 return (roundEven(testInputs.x) == expectedA.x && 10 roundEven(testInputs.xy) == expectedA.xy && 11 roundEven(testInputs.xyz) == expectedA.xyz && 12 roundEven(testInputs.xyzw) == expectedA.xyzw && 13 roundEven(constVal.x) == expectedB.x && 14 roundEven(constVal.xy) == expectedB.xy && 15 roundEven(constVal.xyz) == expectedB.xyz && 16 roundEven(constVal.xyzw) == expectedB.xyzw) ? colorGreen : colorRed; 17} 18