CodeJonas Lindgren · 18 Sep 2026 · 12 min read

Making a pixel-perfect camera for every screen size

Pixel art looks wonderful right up to the moment you scale it by 2.37. Here is how we stopped the shimmer.

Pixel art game on a laptop beside a controller

Lanternfall renders at a native 480×270. That number divides cleanly into 1080p and 4K, which is lovely — until someone plugs in a Steam Deck, an ultrawide monitor or a 1366×768 laptop from 2014. Then you get the dreaded pixel shimmer: sprites wobbling by a pixel as the camera moves.

Rule one: integer scaling, always

We render to a low-resolution target and scale it up by the largest whole number that fits. The leftover space is filled, not with black bars, but with a slightly blurred, darkened extension of the scene. Players see more world, never a stretched pixel.

“If a pixel isn’t square, it isn’t ours.” — sticky note on Priya’s monitor

Rule two: snap the camera, not the sprites

Snapping every sprite to the pixel grid makes slow movement look jittery. Instead we keep positions in sub-pixel space and snap only the camera, then apply the remaining fraction as a tiny offset in the upscale pass. Motion stays buttery and pixels stay crisp.

  • Native render target: 480×270
  • Scale factors used in testing: ×1 to ×8
  • Shimmer bug reports before the fix: 214 — after: 3

What’s next

The same camera now ships in Deep Shift and Mossling. We’ll publish the shader on our GitHub next month, MIT licensed, so you can steal it for your own game.

Jonas LindgrenCo-founder and lead programmer. Has opinions about frame pacing.
Trailer