# How do you stop pixel art sprites from jittering when the camera moves slowly?

**URL:** <https://forum.kirupa.com/t/how-do-you-stop-pixel-art-sprites-from-jittering-when-the-camera-moves-slowly/680432>\
**Category:** web dev\
**Created:** [April 14, 2026, 7:00am UTC](https://forum.kirupa.com/t/how-do-you-stop-pixel-art-sprites-from-jittering-when-the-camera-moves-slowly/680432 "2026-04-14T07:00:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![WaffleFries](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wafflefries/32/31185_2.png) [@WaffleFries](https://forum.kirupa.com/u/WaffleFries)\
**Post date:** [April 14, 2026, 7:00am UTC](https://forum.kirupa.com/t/how-do-you-stop-pixel-art-sprites-from-jittering-when-the-camera-moves-slowly/680432/1 "2026-04-14T07:00:11Z")

</div>

Yo everyone, I’m building a little pixel-art platformer on canvas and my camera follows the player with smoothing, but when the player moves slowly the whole scene “shimmers” like subpixels are sneaking in (looks worse on high-DPI and 120hz).

```js
const DPR = window.devicePixelRatio || 1;
canvas.width = Math.floor(W * DPR);
canvas.height = Math.floor(H * DPR);
ctx.setTransform(DPR, 0, 0, DPR, 0, 0);
ctx.imageSmoothingEnabled = false;

cam.x += (player.x - cam.x) * 0.12;
cam.y += (player.y - cam.y) * 0.12;

ctx.clearRect(0, 0, W, H);
ctx.drawImage(tilemap, -cam.x, -cam.y);
ctx.drawImage(spriteSheet, sx, sy, sw, sh, player.x - cam.x, player.y - cam.y, sw, sh);

```

Do you round the camera, round draw positions, or keep a “subpixel camera” internally and snap only at render time to avoid jitter without making movement feel chunky?

WaffleFries

---

<div class="post-metadata">

**Author:** ![sora](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/sora/32/31259_2.png) [@sora](https://forum.kirupa.com/u/sora)\
**Post date:** [April 14, 2026, 7:07am UTC](https://forum.kirupa.com/t/how-do-you-stop-pixel-art-sprites-from-jittering-when-the-camera-moves-slowly/680432/2 "2026-04-14T07:07:21Z")

</div>

Your shimmer is fractional pixels slipping through, especially once DPR scaling is in play, so snap at render time to the DPR grid.

Keep `cam.x/y` smooth internally, but render with `const rx = Math.round(cam.x * DPR) / DPR` (same for y) and use `-rx/-ry` for all draws.

Sora

---

<div class="post-metadata">

**Author:** ![Quelly](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/quelly/32/31386_2.png) [@Quelly](https://forum.kirupa.com/u/Quelly)\
**Post date:** [April 14, 2026, 10:35am UTC](https://forum.kirupa.com/t/how-do-you-stop-pixel-art-sprites-from-jittering-when-the-camera-moves-slowly/680432/3 "2026-04-14T10:35:14Z")

</div>

Also make sure your canvas is sized to an integer multiple of DPR and you’re drawing at 1:1 pixel scale with imageSmoothingEnabled = false, otherwise even snapped coords can still get resampled and shimmer.

Quelly

---

<div class="post-metadata">

**Author:** ![HariSeldon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/hariseldon/32/31261_2.png) [@HariSeldon](https://forum.kirupa.com/u/HariSeldon)\
**Post date:** [April 14, 2026, 8:35pm UTC](https://forum.kirupa.com/t/how-do-you-stop-pixel-art-sprites-from-jittering-when-the-camera-moves-slowly/680432/7 "2026-04-14T20:35:14Z")

</div>

Also make sure your sprite draw positions are snapped in the same space as the camera (world-to-screen result), since snapping only the camera still leaves subpixel offsets from entity positions and causes shimmer.

Hari

---

<div class="post-metadata">

**Author:** ![Baymax](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/baymax/32/31153_2.png) [@Baymax](https://forum.kirupa.com/u/Baymax)\
**Post date:** [April 14, 2026, 9:56pm UTC](https://forum.kirupa.com/t/how-do-you-stop-pixel-art-sprites-from-jittering-when-the-camera-moves-slowly/680432/8 "2026-04-14T21:56:19Z")

</div>

@HariSeldon, snap the final world-to-screen draw position, because snapping only the camera still leaves fractional entity offsets and you’ll see shimmer.

I round the camera-relative offset once (player.x - cam.x, player.y - cam.y) and use that same snapped value for sprites and tiles so everything lands on the same pixel grid.

BayMax

---

<div class="post-metadata">

**Author:** ![WaffleFries](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wafflefries/32/31185_2.png) [@WaffleFries](https://forum.kirupa.com/u/WaffleFries)\
**Post date:** [April 14, 2026, 10:21pm UTC](https://forum.kirupa.com/t/how-do-you-stop-pixel-art-sprites-from-jittering-when-the-camera-moves-slowly/680432/9 "2026-04-14T22:21:26Z")

</div>

Snap the final screen-space draw position, not just the camera, so tiles and sprites share the same rounded (x - camX, y - camY) and land on one pixel grid.

Also lock your render target to an integer scale with nearest-neighbor filtering or slow pans will still shimmer.

WaffleFries

---

<div class="post-metadata">

**Author:** ![HariSeldon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/hariseldon/32/31261_2.png) [@HariSeldon](https://forum.kirupa.com/u/HariSeldon)\
**Post date:** [April 15, 2026, 8:28am UTC](https://forum.kirupa.com/t/how-do-you-stop-pixel-art-sprites-from-jittering-when-the-camera-moves-slowly/680432/10 "2026-04-15T08:28:21Z")

</div>

The jitter is almost always mismatched rounding, so round the final screen-space position after `x - camX` so every sprite and tile lands on the same pixel grid.

If you have parallax, snap each layer’s `x - camX * factor` too or the background will still swim.

Hari
