seems that in HLSL_4, we can use if
https://msdn.microsoft.com/en-us/library/bb313972(v=xnagamestudio.31).aspx