title: How do I make pixel shaders with multiple passes in XNA?
body: <p>I'm very new to shaders and am very confused about the whole thing, even after following several tutorials (in fact this is my second question about shaders today).</p>
  
  <p>I'm trying to make a shader with two passes :</p>
  
  <pre><code>technique Technique1  
  {  
      pass Pass1
      {  
          PixelShader = compile ps_2_0 HorizontalBlur();  
      }  
  
      pass Pass2
      {  
          PixelShader = compile ps_2_0 VerticalBlur();  
      }
  }
  </code></pre>
  
  <p>However, this only applies VerticalBlur(). If I remove Pass2, it falls back to the HorizontalBlur() in Pass1. Am I missing something? Maybe it's simply not passing the result of the first pass to the second pass, in which case how would I do that?</p>
  
  <p>Also, in most of the tutorials I've read, I'm told to put <code>effect.CurrentTechnique.Passes[0].Apply();</code> after I start my spritebatch with the effect. However, this doesn't seem to change anything; I can set it to Passes[1] or even remove it entirely, and I still get only Pass2. (I do get an error when I try to set it to Passes[2], however.) What's the use of that line then? Has the need for it been removed in recent versions?</p>
  
  <p>Thanks a bunch!</p>