uniform half4 colorGreen, colorRed; half4 main(float2 coords) { // Basic switch test. switch (int(colorGreen.g)) { case 0: return colorRed; case 1: return colorGreen; default: return colorRed; } }