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