I made a motion blur using OpenGL immediate mode, basically it involves saving screen to texture, then rendering blended texture back (let's skip the details) with something like this:
glBegin(GL_QUADS); glColor4f(1.0f, 1.0f, 1.0f, 1.0f); glTexCoord2f(0.0f, 1.0f); glVertex2f(0, 0); // Bottom Left Of The Texture and Quad glTexCoord2f(1.0f, 1.0f); glVertex2f(800, 0); // Bottom Right Of The Texture and Quad glTexCoord2f(1.0f, 0.0f); glVertex2f(800, 600); // Top Right Of The Texture and Quad glTexCoord2f(0.0f, 0.0f); glVertex2f(0, 600); glEnd(); My problem is: When I use the motion blur, seemly the blended screen get 1 pixel shifted to the opposite of (0, 0), resulting in everything getting blurry, not only the moving stuff.
The stronger I apply the effect, the stronger everything else blurs (as seemly every frame of blur get 1 more pixel shifted).
How I fix that?