title: Shader switch v conditional inside shader
body: <p>Is it better to create two shaders, one for each side of a branch, or to put a branch inside pixel shader code, in terms of performance?  For example, if I have a Gaussian blur shader, that decides between performing a horizontal or vertical pass, would it be better for me to split it out into two separate shaders, binding one and then the other, or keep the branch inside the shader code itself, meaning I don't have to switch shaders for the second pass?</p>
  
  <pre><code>void main(void)
  {
      ...
  
      if (uniform_Orientation == 0)
      {
          // Horizontal blur
      }
      else
      {
          // Vertical blur
      }
  }
  </code></pre>
  
  <p>My instinct tells me I should split it out into two separate shaders, but then I'm not sure what the performance implications are for switching shaders.  </p>
  
  <p>Anyone have any thoughts on this?</p>