title: Sprite Color palette swap in Pixel Shader
body: <p>I am in the making of a sprite based fighting game, and development has come to a point, that I want to implement color swapping of images during runtime (so a user can specify through an interface, what exact color should be changed to what, and it would be done in an instant, whithout any interruption by a loading screen). 
  I figured it would be quite easily achieved in the pixel shader. I tried it out, by setting the values to change specifically an other color, and it worked quite well. 
  For the next step I wanted to make it to read out the data from a text file (containing the color codes of the color to change and then the color to change to). It has several entries, and it is stored in an array like this:</p>
  
  <pre><code>XMFLOAT3 palette[10][2];
  </code></pre>
  
  <p>And here is the corresponding constant entry in the shader:</p>
  
  <pre><code>float4 xPalette[10][2];
  </code></pre>
  
  <p>What this means, it stores 10 colors to change and 10 colors to change those to. I pass this to the Pixel Shader via a constant buffer, and it does not work as planned, because only the array's last entry is recognised, all the others are zeroes. I think it would be because the 16-bit alignation before sending data to the GPU? What other method is there to send data like this to the pixel shader? 
  Thank you for reading through this!</p>