Skip to content

Smart upscale

Generate a high-resolution version of your sprite using a pixel-art-aware algorithm. The xBR family detects diagonal edges and smooths them, producing a larger image that keeps the pixel-art aesthetic without the blurry look of bilinear / bicubic upscaling.

The output is a PNG you can download or paste into another tool — your project canvas isn't modified.


Where to find it

Top bar → Upscale button (Maximize2 icon, next to Export).


Algorithms

AlgorithmUse it when
xBR 2× (recommended)You want a smart, edge-aware 2× upscale that preserves the pixel-art look.
xBR 4×Same kernel applied twice. Gentler than nearest 4× but still distinct from blurry interpolation.
Nearest 2×Sharpest possible 2× — each source pixel becomes a 2×2 block.
Nearest 3× / 4× / 8×Block scaling for promo / social / banner exports. Keeps every pixel crisp.

What xBR does

For every source pixel, the algorithm examines an 11-point neighbourhood and decides — per output corner — whether to blend with a diagonal neighbour (smooth a stair-step diagonal into a clean line) or hold the centre colour (preserve a hard edge).

The result: 1-pixel-wide diagonals become smooth lines at 2× / 4×, while horizontal / vertical edges stay sharp.

Source 1× (a stair-step):     Nearest 4×:               xBR 4×:
                              ████░░░░░░░░░░░░          ████░░░░░░░░░░░░
█░                            ████░░░░░░░░░░░░          ▓███░░░░░░░░░░░░
░█                            ░░░░░░░░████░░░░          ░▓███░░░░░░░░░░░
                              ░░░░░░░░████░░░░          ░░▓███░░░░░░░░░░
                                                        ░░░▓███░░░░░░░░░

xBR reads the diagonal pattern and draws a smooth slope; nearest just makes each pixel into a square block.

How close to reference xBRz

The current implementation matches Zenju's reference algorithm in:

  • YCbCr colour distance with LUMINANCE_WEIGHT = 87, EQUAL_COLOR_TOLERANCE = 30. Same defaults as the reference.
  • Per-corner blend classification — each corner is none / normal / dominant based on dominant-direction (3.6) and steep-direction (2.2) thresholds.
  • Native 4× pattern — each output 4×4 block uses position-aware blending (corner-most sub-pixel uses tri-blend of diagonal + cardinal A + cardinal B; cardinal-side sub-pixels lean toward their respective cardinal).

Differences from the reference:

  • Thresholds are fixed (the reference exposes them as a config struct). Hard-coded to the published defaults.
  • No dynamic-programming pattern continuity check that re-evaluates neighbours for cross-pixel coherence. Minor seams may appear on "every-other-pixel" edges; invisible on most sprite work.
  • 3× xBR not implemented — use Nearest 3× or 4× → downscale.

For 95% of pixel-art use cases the difference is imperceptible. If you need pixel-perfect xBRz output for an emulator-grade export, post-process through RetroArch's xBRz shader.


The dialog

Smart upscale dialog

ControlWhat
Use current selection onlyWhen a selection is active, only its bounds upscale; otherwise the whole canvas.
Algorithm pickerPick xBR or Nearest at a chosen factor. Live preview updates instantly.
PreviewCheckerboard-backed canvas at native resolution (display capped at 560 px wide).
Copy PNGCopies the upscaled PNG to the clipboard. Paste into Photoshop, Figma, Discord, etc.
Download PNGSaves the PNG with a name like upscale_xbr-2x_64x64.png.
CloseDismiss without doing anything.

Workflow

Promo art for a portfolio

  1. Open your finished sprite.
  2. Top bar → Upscale.
  3. Pick Nearest 8× for a sharp, blocky 8× output (e.g. 32×32 → 256×256).
  4. Download PNG. Done.

Comic / website thumbnails

  1. Select the area you want (or the full canvas).
  2. UpscalexBR 4×.
  3. Copy PNG → paste into your design tool.

Game build "high-res mode"

  1. Export your sprite sheet at 1× from the Export dialog.
  2. Run the sprite sheet through external xBRz (if you need the highest quality) or use this dialog's xBR 2× for an in-app upscale of single sprites.

Tips

  • Selection upscale is great for "zoom into one detail" — drag a rect selection over an eye or a logo, then upscale.
  • xBR works best on sprites with clean outlines and shading. Heavily-dithered art (Bayer dither) may produce mixed results — try Nearest in those cases.
  • The output PNG includes alpha. Transparent pixels in the source stay transparent in the upscale.
  • Performance: a 64×64 sprite at xBR 4× upscales in ~30 ms. Larger sprites scale linearly with pixel count.

  • Export formats — the standard export dialog (PNG / sheet / GIF / JSON) does not upscale beyond integer multiples
  • Selection — select a sub-region to upscale only that area

Motestack is a personal hobby project. The editor and these docs ship under no warranty — back up your `.mstack` files.