   GLSL rendering motion vectors to texture
  I want to add a motion blur effect to my game - only for projectiles at the moment. For every projectile I have the current position and the position of the last frame, both in world coordinates.The idea is that I render all projectiles to a texture, using a FBO, and then apply a postprocessing directional blur using shaders. To get the blur angle, I need a shader which calculates the motion vector for the bullet in screen space. I only have the motion vector in world space (new_pos - old_pos). I already tried some shaders to do that, but they won't work correctly. Is there an easy way to do it?My idea was to use one screen-sized FBO texture along with a velocity texture (each pixel represents a motion vector in screen space) to calculate motion blur for all bullets in one rendering pass. The problem is rendering the per-pixel motion vectors.   
  Maybe you can render two frames of the projectile to two different FBO textures.That way the difference would tell you something about the motion vector..   