title: Compute shaders, where do they fit in the pipeline?
body: <p>I have been at this all day and am starting to give up on it. I can't find a lot of information on compute shaders. Best source was "Practical Rendering and Computation with Direct3D 11" and unfortunately it was not too much help. It helped me understand some theories but I still don't know how to implement anything.</p>
  
  <p>I am working on something similar to the particle system that is created in that book. Except my particle system will basically just have particles that display in a 3d grid (nothing like gravity/forces/etc). This is for educational purposes, if I get this working I would be able to work out the rest I assume. </p>
  
  <p>What I don't understand is how the compute shader fits into the pipeline. I think I understand what I need to do, but I dont know how I am supposed to get it working. </p>
  
  <p>I need to somehow seed the compute shader with a buffer filled with all of the particle positions. (Say, a 1024x1024x1 buffer). I then need this compute shader to output every position as a vertex to my vertex shader, and the rest of the pipeline is standard after that (vertex shader does all the transformations, my geometry shader expands the vertex out to a quad, and my pixel shader renders it).</p>
  
  <p>I don't even know if this is right, but it sounds right. And even if it is, I have no idea as to how I would go about doing this. How would I feed the output of the compute shader to the vertex shader? How would I initially seed the compute shader to begin with? How would I ensure the compute shader does not discard the buffer of particles? (otherwise, i'd have to supply the particles every time, which would defeat the purpose of (eventually) doing a particle system with particles that move around, etc, as i would have to do all that on the CPU)</p>
  
  <p>There are so many unknowns, and it feels like I am expected to know it all to even begin writing these shaders. I can't find any stepping stones.</p>