title: Achieving 'noperspective' interpolation in shader profile ps_4_0_level_9_*
body: <p>I'm trying to do texture mapping without perspective correction while targeting shader profile <code>ps_4_0_level_9_*</code>, but the HLSL compiler won't support the <code>noperspective</code> interpolation modifier unless I target <code>ps_4_0</code>. It appears that the <code>SV_Position</code> semantic implies <code>noperspective</code>, but I haven't been able to find another semantic that would imply it and that I could use for my UV coordinates. My understanding is that in Direct3D 9, one could use <code>POSITION[0-9]</code> and/or <code>VPOS</code> to have multiple <code>noperspective</code> attributes, but those don't seem to have an effect in my case. Is there an alternate trick for <code>ps_4_0_level_9_*</code>?</p>
  
  <pre class="lang-c prettyprint-override"><code>struct Vertex
  {
      float4 position : POSITION;
      float2 uv : TEXCOORD;
  };
  
  struct VSToPS
  {
      /*noperspective*/ float2 uv : POSITION;
  };
  
  Texture2D Texture;
  
  SamplerState Sampler
  {
      Filter = MIN_MAG_LINEAR;
      AddressU = Clamp;
      AddressV = Clamp;
  };
  
  VSToPS VSMain(
      Vertex vertex,
      out float4 position : SV_Position) // Not needed by PS
  {
      position = vertex.position;
  
      VSToPS output;
      output.uv = vertex.uv;
      return output;
  }
  
  float4 PSMain(VSToPS input) : SV_Target
  {
      return Texture.Sample(Sampler, input.uv);
  }
  </code></pre>