1uniform half4 colorRed, colorGreen; 2 3half4 main(float2 coords) { 4 // The inner comparisons against colors should evaluate to true in every component. 5 // The outer comparison should evaluate to `true == true`, so is true in each channel. 6 bool4 result = equal(lessThan(colorRed, half4(2.0)), 7 greaterThan(half4(3.0), colorGreen)); 8 9 return all(result) ? colorGreen : colorRed; 10} 11