How to do pixel-perfect integer scaling? I'm trying to achieve a nice retro look by rendering my scene to a rather small framebuffer (e.g. 320x240) and scaling it to a multiple (e.g. 640x480). The thing is, though, that if I use a texture with nearest neighbor filtering, the result is not pixel perfect.

Instead, the resulting image has jitter whenever something moves, which doesn't make sense if the filtering really is nearest neighbor - there's no "subpixels" in the original, unscaled image, so the upscaled image should just represent each original pixel with four pixels like this:

     _       ____
    |_| --&gt; |    |
            |____|

So, the question is: do I need to do something special in my full screen quad shader in order to achieve pixel perfect upscaling?