title: iOS Metal Shader - Texture read and write access?
body: <p>I'm using a metal shader to draw many particles onto the screen. Each particle has its own position (which can change) and often two particles have the same position. How can I check if the <code>texture2d</code> I write into does not have a pixel at a certain position yet? (I want to make sure that I only draw a particle at a certain position if there hasn't been drawn a particle yet, because I get an ugly flickering if many particles are drawn at the same positon)</p>
  
  <p>I've tried <code>outTexture.read(particlePosition)</code>, but this obviously doesn't work, because of the texture access qualifier, which is <code>access::write</code>.</p>
  
  <p>Is there a way I can have read and write access to a <code>texture2d</code> at the same time? (If there isn't, how could I still solve my problem?)</p>