   Multi-Line IF statement in HLSL?
  I have just cracked why there is a back projection artifact in my projected texture, however due to the design of my shader code without going into details, to resolve that I need a multi-line if statement in HLSL.I only know how to do a single line IF such as this example.return IN.TexCoord1.w < 0.0 ? Color : I * Color;I need more lines to apply a falloff to my textures lighting based on distance from the light source etc. MSDN is not being a big help. Cheers!   
  You can use dynamic branching like in C/C++:if((condition || condition2) && condition3){doSomeStuff();doSomeMoreStuff();etc.}else if(!condition4){doOtherStuff();etc.}else{doOtherAnotherStuff();doBlaBlaStuff();etc.}etc. etc.;  brilliant! I am quite new to the HLSL shader scene but not to game architecture and C++ coding not sure on the limitations only really discovering the true potential of them after splitting the appearance of my meshes down a direction based on a projection matrix. Insanely interesting what you can achieve! but it means so much more when your the one that can do it and understand the components operation.   ;  Just one word of warning, excessive branching (if-statements) in hlsl is generally not recommended. It's not such a big deal on modern hardware but older cards do not handle branching very well in terms of performance. Keep in mind that pixels are rendered together in batches of up to 1024 at a time in their own threads. If just one of those pixels takes ages to return then they'll all be blocked until it does. It's not like on a CPU where you think 9 short ops and 1 long op won't take that long.   