title: GPGPU - effective ping-pong technique?
body: <p>I'm trying to implement effective fluid solver on the GPU using WebGL and GLSL shader programming.</p>
  
  <p>I've found interesting article:
  <a href="http://http.developer.nvidia.com/GPUGems/gpugems_ch38.html" rel="nofollow">http://http.developer.nvidia.com/GPUGems/gpugems_ch38.html</a></p>
  
  <p>See: <strong><em>38.3.2 Slab Operations</em></strong></p>
  
  <p>I'm wondering if this technique of enforcing boundary conditions is possible with ping-pong rendering?
  If I render only lines, what about an interior of the texture?
  I've always assumed that the whole input texture must be copied to temporary texture (ofc boundary is updated during that process), as they are swapped after that operation.</p>
  
  <p>This is interesting especially considering the fact, that <strong><em>Example 38-5. The Boundary Condition Fragment Program</em></strong> (visualization: <a href="http://i.stack.imgur.com/M4Hih.jpg" rel="nofollow">http://i.stack.imgur.com/M4Hih.jpg</a>)  shows scheme that IMHO requires ping-pong technique.</p>
  
  <p>What do you think? Do I misunderstand something?</p>
  
  <p>Generally I've found that texture write is extremely costly and that's why I would like to limit it somehow. Unfortunately, the ping-pong technique enforces a lot of texture writes.</p>