title: Changing texture in HLSL
body: <pre><code>float4x4 WVP;
  texture cubeTexture;
  
  sampler TextureSampler = sampler_state
  {
  texture = &lt;cubeTexture&gt;;
  MipFilter = Point;
  MagFilter = Point;
  MinFilter = Point;
  AddressU = Wrap;
  AddressV = Wrap;
  MaxAnisotropy = 16;
  };
  </code></pre>
  
  <p>So if I'm not mistaken this tells the sampler state what texture I'm using.
  I'm using one effect file for many many sprites, therfor this allows me to use one texture (atlas).
  And I could combine all my texture atlases into one grand daddy atlas but I fear the complications.</p>
  
  <p>Is there a way to tell the pixel shader to use a certain texture by its parameter?
  I'm new to HLSL and it's very confusing to me.</p>