uniform half4 colorGreen, colorRed; half4 helper(); half4 main() { return helper(); } enum class E { kBlack = 0, kGray = 1, kWhite = 2 }; half4 helper() { E temp = E::kGray; switch (temp) { case E::kBlack: return colorRed; case E::kGray: return colorGreen; case E::kWhite: return colorRed; default: return colorRed; } }