Integer scaling, or pixel-perfect scaling,
is a method for image upscaling (enlargement)
with no blur and no distortion.
Turns each pixel into a square or rectangular group
of integer number of same-color pixels.
Prevents sharpness loss in videos and 3D games when scaling Full HD to 4K
and maintains pixelation in old and pixel-art games.
Summary
Issue
Full HD on 4K monitors and most 4K TVs looks worse
than on Full-HD monitors and TVs.
This happens due to blur added by all monitors
and absolute majority of TVs at any scale,
though this can be avoided when enlarging by an integer number of times
(e. g. 2 in case of FHD→4K).
As a result, sharpness in videos and 3D games is decreased,
motion clarity is worse, white lines are gray, and pixel art is not pixel art anymore.
Solution
Each logical pixel can be displayed as a square group
of integer (2×2, 3×3) number of physical pixels
of the same color without mixing-in colors of surrounding pixels.
If the native display resolution and logical resolution are not divisible,
we can use the maximum integer scale that the scaled image fits the screen at,
and fill the rest space with black, like in centered mode without scaling.
Such lossless scaling is already built into graphics drivers
and some software video players and removes blur regardless of monitor or TV used.
But such prescaling is impossible if the signal source is not a computer,
but e. g. a game console or a hardware video player.
Also, prescaling wastes bandwidth of video interface (HDMI, DP).
This may sacrifice refresh rate and color depth.
AMD: supported for GPUs based on the 2nd-generation
GCN ()
and newer architectures in Radeon Software 2020 (19.12.2+)
() for Windows 7/10;
being implemented for Linux.
Intel: supported for Gen11 GPUs in the driver
25.20.100.7155+ () for Windows 10;
available since in laptops
equipped with Gen10 CPUs based on the Ice Lake architecture.
nVidia: supported with limitations for RTX and GTX 16*
in the driver 436.02+ () for Windows 10;
incompatible with HDR, tiled mode, custom resolutions,
4:2:0, sharpening, DSR, and hybrid-GPU laptops.
Linux: supported in Proton 4.11-10+
() (used in Steam Play);
limited support in XRandR 1.5.1+ ()
and nVidia graphics driver 384.47+ ():
image is cropped in many games.
Monitors:
Supported in 27″ 4K and QHD monitors
Eve/Dough Spectrum based on LG Nano IPS panels
with refresh rates up to 144 Hz (QHD, 4K) and 240 Hz (QHD).
Supported in dual-mode 27″ 4K monitor Alienware AW2725QF
in FHD@360Hz mode according to Monitors Unboxed.
Standalone scalers:
RetroTink-4K ($750) and Morph 4K ($275) (without $100 module with analog inputs yet) are released,
with support for 4K output, integer scaling of digital and analog signals,
and simulation of CRT displays.
What scaling is
The image on computer monitors and TVs consists of pixels (color dots).
The number of pixels in horizontal and vertical directions is called resolution.
Scaling is resizing (changing resolution of) an image.
It is needed if native (physical) resolution of the display
(a monitor or a TV set) is different
from the resolution of the video signal it receives:
e. g. if a game at a resolution
of 1920×1080 (Full HD) is running in full-screen mode
on a monitor with a native resolution of 3840×2160 (4K).
The issue — blur
With all monitors, most of TVs and many graphics cards (GPUs) of previous generations,
scaling leads to losing sharpness at any scale.
Such sharpness loss is perceived as blur and is irreversible quality loss.
But actually, the blur is only inevitable
when enlarging by a non-integer number of times.
For example, it’s impossible to display one logical pixel as 1.5×1.5 physical pixels,
so we are forced to use interpolation that calculates
average colors of surrounding pixels of the image to scale.
The solution — integer scaling
If the scale is not fractional (e. g. 1.5),
but integer (e. g. 2 or 3),
the blur can be avoided just by displaying each logical pixel
as a square group of an integer
(e. g. 2×2 or 3×3)
number of physical pixels of the same color —
i. e. just by duplicating
the corresponding pixel of the original image multiple times
without affecting it with colors of surrounding pixels.
Such lossless scaling is known as:
integer scaling (integer-ratio, integer-factor, integral scaling);
pixel-perfect scaling;
pixel doubling (duplication).
More than Nearest Neighbour
The “Nearest Neighbour” scaling algorithm is only lossless
at integer ratios of sizes of resulting and original images,
but results in distortion at fractional ratios
due to different sizes of resulting pixels:
As a result of such distortion, same pixels
of virtual objects moving on the screen, are constantly changing in size.
This results in so called pixel shimmering, or jitter.
Integer scaling is lossless because the scale
is always integer and all pixels have the same size.
If resolutions of the display and the image are not divisible,
the image is scaled with such an integer ratio
that results in filling the screen as fully as possible,
and the rest screen space is filled with black background
the same way as when the image is centered on the screen with no scaling.
For example, we can display a 1280×1024 image on a 3840×2160 (4K) screen
by displaying each image pixel as a group
of 4 (2×2) identical physical pixels with black margins
of 56 physical pixels above and below,
and 640 pixels on the left and on the right.
Examples
Pixel art
The differences between blurry bilinear interpolation
and lossless integer scaling are clearly evident
on a pixel-art image:
Photos
See also the photos of the same
screenshot
of the Reaper application at 200% scale, scaled using three methods:
For better understanding of what integer scaling is,
see the web-basedlive demo.
It allows to compare an image scaled with an integer ratio
with no blur and a regular blurry image.
It also supports viewing custom images, aspect-ratio correction, and scanlines.
Use cases
Working at a resolution lower than native display resolution makes sense for the following purposes:
performance boost in modern 3D games, especially on laptops;
ability to use 4K+ displays to play games
not intended for displays with high pixel density (HiDPI):
games that don’t scale their user interface;
games that work incorrectly at 4K+ resolutions;
with integer scaling:
ability to use higher-resolution displays
with lower-resolution video sources such as game consoles,
with no unreasonable quality loss caused by blur;
maintaining pixelation in old
and pixel-art games;
decreasing power consumption and heat of the computer:
decreasing noise of the graphics-card cooler;
energy saving;
speeding down environment pollution.
Why it’s important
With 4K monitors of 24—27″ size at Full HD resolution,
single image pixels are almost indistiguishable,
so blur does not add any smoothing and just pointlessly
decreases sharpness resulting in an unreasonable quality loss.
Integer scaling by pixel duplication needs no calculations
and so works much faster than bilinear or bicubic interpolation.
This makes it possible to:
decrease or remove a extra input lag introduced by scaling;
save computational power of the scaling device;
decrease its power consumption, heat and cooler noise.
User has a right not to have unreasonable quality loss
when working at resolutions different from the native display resolution.
A faster graphics card has a higher heat emission
(TDP) and increased cooler noise.
Noise has a negative impact to user comfort
and may result in irreversible diminished hearing in long term.
This also applies to a graphics card that has its computational power
utilized to a higher degree than could be at a lower resolution.
Faster CPU and/or GPU do not solve the issue entirely
since the issue is not just about computer performance (see below).
Integer scaling is required for uniform distribution of scanlines
often used for increasing perceived detail in old games.
When using even integer scales in conjunction with 4:2:2 or 4:2:0 chroma subsampling,
integer scaling on video-source side allows to decrease needed video-interface bandwidth
by one third or twice correspondingly with no quality loss.
Static blur affects motion clarity,
partly defeating the purpose of increased refresh rate
supported by dual-mode monitors
in half-resolution mode.
Even more important with higher native resolution
The higher native (physical) display resolution is,
the more important and effective integer scaling gets.
At a higher resolution, it’s harder to achieve comfortable performance in games.
The 4K resolution is 4 times higher than Full HD.
The 8K (7680×4320) resolution is another 4 times higher.
On a display with a higher native resolution,
a logical pixel is less noticeable at the same display size and scale,
so blur as a sort of smoothing gets even less reasonable.
For example, a pixel on a 24–27″ 4K monitor
can still be noticeable at the Full HD (1920×1080) resolution
at a certain combination of the viewing distance
and antialiasing quality in the game.
But with the physical resolution of 8K and the signal resolution of 4K,
logical pixel will be totally indistinguishable under the same conditions.
A higher native display resolution typically allows
to use screen fuller when using integer scaling.
For example, at the 320×240 resolution typical for DOS games,
just 89% of the height of a Full HD (1920×1080) display is used
(used 960 of 1080 pixels with the ratio of 4),
while the height of a 4K monitor is used entirely (the scale is exactly 9).
Original resolution
Resolution after scaling
Note
FHD
4K
8K
Ratio
Height loss
Ratio
Height loss
Ratio
Height loss
256×224
SNES
4.8
17%
9.64
6.7%
19.3
1.5%
On 4K, height loss is 2.6 times smaller than on FHD.
On 8K — 4.5 times smaller than on 4K
and 11.5 times smaller than on FHD
320×240
qVGA
4.5
11.1%
9
0
18
0
640×480
VGA
2.25
11.1%
4.5
11.1%
9
0
Same height loss on FHD and 4K
800×600
SVGA
1.8
44.4%
3.6
16.7%
7.2
2.8%
On FHD, fits only at 100% zoom (no zoom).
On 4K, height loss is 2.67 times smaller than on FHD;
on 8K — 6 times smaller than on 4K,
and 16 times smaller than on FHD
1024×768
XGA
1.4
28.9%
2.81
28.9%
5.63
11.1%
On FHD, fits only at 100% zoom (no zoom).
On 8K, height loss is 2.6 times smaller than on 4K and FHD
With a higher-resolution display, it’s possible
to achieve a more precise aspect ratio of the image
when doing integer scaling on both axes with aspect-ratio correction enabled.
For example, for the resolution of 256×224 typical for 16-bit game consoles
such as SNES and Sega Mega Drive (Genesis), on a 4K display,
aspect-ratio error relative to the perfect aspect ratio of 4:3 is 5%,
while on a 8K display, the error is below 1%.
On 8K displays, integer scaling allows to use
with no loss of quality or screen space,
any of the typical resolutions, effectively allowing to flexibly change
the native display resolution:
8K (7680×4320, 1x);
4K (3840×2160, 2x);
QHD (2560×1440, 3x);
FHD (1920×1080, 4x);
HD (1280×720, 6x).
At resolutions divisible by three (QHD, HD),
it’s even technically possible to simulate subpixel layout of pixels
by representing each virtual subpixel
as a physical pixel or a group of physical pixels.
Faster GPU is not a solution
There are cases when using a more performant CPU
and/or graphics card (GPU) cannot help:
if a high-pixel-density display is installed into a laptop,
installing a powerful graphics card is virtually impossible
due to natural limitations in terms of space,
power consumption and heat dissipation;
many games contain bitmap elements (e. g.
menu in “Half-Life 2”
and toolbars in “Cities XL Platinum”)
which get small at 4K resolution, making the game almost unplayable;
some games work incorrectly at 4K resolution
(e. g. in the “Bionic Commando Rearmed” game,
conundrum elements are invisible in “Hack enemy network” sublevels);
some games (e. g. “Duck Tales Remastered”)
have a fixed resolution (e. g. Full HD)
while support for other resolutions is achieved via blurry scaling built into the game;
in games based on pixel art, performance is not an issue,
and the important thing is the pixelated nature of the image
with no inappropriate blur not matching the intention of the game authors;
the computer performance does not matter if the video-signal source is not a computer,
but e. g. a game console or a hardware video player.
Partial solutions
Scaling software
IntegerScaler —
an application for scaling Windows games that support windowed mode.
GeDoSaTo
(source code is available) —
an application for scaling 3D games. Drawbacks:
only supports relatively old games that use DirectX 9 or older;
works with just some of them;
on some systems, modern versions of the application don’t work at all,
yours truly was able to use successfully one of its previous versions —
Beta 10 Poltergeist.
Wrappers for Glide and DirectX
Glide is the API behind 3dfx graphics accelerators.
Glide wrappers allow to play Glide-powered games on computers supporting modern DirectX and OpenGL APIs.
nGlide —
a Glide wrapper (emulator) — since the version
2.10 ()
supports integer scaling:
“Options” → “Aspect ratio” → “Integer scaling”.
dgVoodoo 2
(Glide emulator and wrapper for DirectX up to version 9 inclusive) supports integer scaling.
Example for “POD Gold” game (GOG)
(click to expand)
Setting-up dgVoodoo 2.82.5 () for enabling
integer scaling in GOG version of “POD Gold” game:
Right click on tab bar → check “Show all sections of the configuration” checkbox .
On appeared “GeneralExt” tab: “Image output” →
“Integer scale factor” → “Max available”.
Press “Apply” button.
Copy following files from dgVoodoo folder to game folder:
dgVoodoo.conf
MS\x86\D3D9.dll
DXGL (OpenGL implementation of DirectDraw)
reportedly supports the nonblurry scaling algorithm “Nearest Neighbour”
(sources: 1,
2).
Game-console emulators and old-game engines
An emulator is an application that allows to run software
(e. g. a game)
intended to run on one platform
(e. g. a game console)
on another platform (e. g. a computer).
For a list of emulators that support integer scaling
and information on how to enable integer scaling in each,
see the page
“Emulators with support for integer scaling”.
Modifications and FPGA implementations of old game systems and computers
PS1Digital ($160) —
a modification kit/board for the game console Sony PlayStation (PSX) —
supports integer scaling with output via HDMI
at a resolution of 480p to 1080p (Full HD).
The HDMI port replaces the “Serial IO” port.
The mod kit can be installed into SCPH-550x and SCPH-700x models
of any region based on the PU-18
and PIU-20 motherboards.
DCDigital (formerly DCHDMI) ($130) —
a modification kit/board for the game console Sega Dreamcast —
supports integer scaling with output via HDMI
at a resolution of 480p to 1080p (Full HD).
The mod kit can be installed into VA0 and VA1 models of any region
with an icon consisting of 0 or 1 inside a circle on the sticker.
UltraHDMI —
a modification kit/board for the game console Nintendo 64 —
supports integer scaling with output via HDMI
at a resolution of 480p to 1080p (Full HD).
Delay with processing disabled is below 100 ns (0.1 ms).
With processing (scanlines, crop, etc.) enabled, the average delay is 1 frame (16 ms).
Review by RetroRGB.
Super Nt ($190),
Mega Sg ($190)
and Nt mini —
FPGA-based semihardware analogs
of the game consoles SNES (Super Nintendo), Sega Mega Drive (Genesis) and NES (Nintendo)
correspondingly — support integer scaling with optional image cropping for maximum screen-height usage.
The image is output via HDMI at the Full HD (1920×1080, 1080p) resolution.
MiSTer —
a semihardware FPGA-based platform
for creating functionally-precise replicas of multiple old game systems and computers — supports integer scaling.
Can be enabled via the
vscale_mode=1
parameter in the settings’ file MiSTer.ini.
The image is output via HDMI at up to the Full HD (1920×1080, 1080p) resolution
(video_mode=8 in MiSTer.ini),
and up to 2048×1536 (video_mode=13) with overclocking.
Many cores support integer scaling both vertically and
horizontally
for preventing pixel shimmering.
Many cores support
cropping
in Full HD output mode for fuller screen-space usage.
MiSTer is based on the
Terasic DE10-Nano
development board ($170) that uses the FPGA
SoC Intel/Altera Cyclone V.
OS virtualization
VirtualBox —
a virtualization environment — supports nonblurry scaling of the virtual machine’s screen
in the range of 100–300%:
“Machine” → “Settings” → “Display” →
“Screen” → “Scale Factor”.
Custom resolutions
In games and emulators that don’t support integer scaling,
it’s sometimes possible for this purpose, to use custom resolutions
combined with centered output via graphics card.
Prerequisites
The game must have a fixed resolution not changing while the game is already running.
The game resolution must be known in advance.
The game/emulator must support:
scaling with no blur, with the “Nearest Neighbour” algorithm;
stretching the image to entire screen on both axes
without maintaining aspect ratio and with no black bars around.
For resolutions that don’t need aspect-ratio correction,
the ability not to maintain aspect ratio is not necessary.
How to use
Calculate the size of the scaled image for the specific game or emulator
at integer scales based on the resolution of the specific display
(monitor or TV) (see the algorithm).
In the control panel of the graphics card:
create a custom resolution equal to the calculated size of the scaled image;
choose:
scaling via graphics card (GPU);
centered output mode with no scaling.
In the game or the emulator, choose a mode that stretches the image
to the entire screen both vertically and horizontally,
without maintaining aspect ratio and with no black bars around the scaled image.
Switch the system screen resolution to the corresponding custom resolution.
Play in full-screen mode.
Example
For example, if the game resolution is 320×240 and the screen resolution is 1920×1080 (Full HD),
then the maximum integer scale is 4 and the required custom resolution is 1280×960:
1080 / 240 = 4.5 → 4
320 × 4 = 1280
240 × 4 = 960
Scaling built into games
Nonblurry scaling is built into some modern games.
This is typically available in pixel-art games,
but some 3D games have the feature too.
Owlboy ()
(an adventure platformer based on pixel art) —
nonblurry scaling is built into the game.
Resident Evil 3
() — GOG version of the game has built-in integer scaling.
QuakeSpasm
(a Quake version powered by a more modern engine) —
integer scaling is built into the game since the version
0.93.0 ()
with support for scales up to 400% via the r_scale configuration option.
To use the feature, put a text file named autoexec.cfg
into the ID1 subfolder inside the game folder,
and put the option like r_scale 4 into this, where 4 is the scale.
For example, at the 3840×2160 chosen in the game settings, the game renders at 960×540
and upscales to 3840×2160 with no blur by representing each logical pixel
as a square group of 16 (4×4) physical pixels of the same color.
Dusk () (a retro-style 3D shooter) —
integer scaling is built into the game with support for scales up to 800%.
It can be enabled with the “Pixelization” → “1x-8x” setting
in the “Advanced Display Settings” section in the game settings.
The setting is reportedly
set to the “2x” value by default, that, for example, corresponds
to the Full HD logical resolution on a display with the 4K native resolution.
Viewing images and playing videos
XnView —
an application for viewing images — supports scaling with no blur.
To enable that, uncheck the checkbox
“Tools” → “Options” → “View” →
“High quality zoom” → “Enlarge”.
Limitation: the option is applied to all viewed images regardless
of the ratio of their size to the size of the viewer window and using full-screen mode.
Limitation (unrelated to scaling): doesn’t support viewing images
that have file names with characters different from alpha-numeric latin characters
and corresponding to the main system language.
MPC-HC —
a player for playing videos — supports scaling with no blur.
To enable that, use the setting
“View” → “Options” → “Playback” →
“Output” → “Resizer” → “Nearest neighbor”.
The setting is available when using rendering engines
“Video Mixing Renderer 9 (renderless)”,
“Enhanced Video Renderer (custom presenter)”
and “Sync Renderer”.
A rendering engine can be selected via the “DirectShow Video”
dropdown on the same settings’ page.
A limitation: the option is applied to all played videos regardless
of the ratio of their frame size to the size of the player window and using full-screen mode.
After releasing the version 1.7.13 (),
original MPC-HC was discontinued,
development is now continued by clsid2
on GitHub.
Windows’ built-in features
For windowed applications — Windows Magnifier. Drawbacks:
unusable user interface — it’s hard to align precisely
the scaling area with the bounds of the object to scale;
when the size of the object to scale and the monitor’s resolution are not divisible,
the area around the object is not filled with a single-color background,
so other objects are visible besides the scaling subject itself;
in windowed mode, there are a lag and some stuttering;
in full-screen-output mode, there is stuttering at least in some games
(e. g. WRC 6)
(maybe specific to Windows 7) and a lag is possible.
For windowed Windows applications incompatible with HiDPI (non-DPI-aware) — using Windows 10, where, unlike Windows 7, old applications are automatically scaled with no blur at integer Windows zooms.
In Windows 10, for games with support for the “Borderless” pseudo-full-screen mode (a window with no borders that has a size of entire screen), it’s possible to use nonblurry scaling with a ratio equal to system-level zoom.
“Borderless” is a special type of windowed mode that, unlike the regular windowed mode, uses a window that has neither borders nor a titlebar, so the entire window is the game-rendering area.
Depending on the game or its settings, such a window may either occupy the entire screen or have a fixed size equal to in-game resolution.
For scaling with the “Borderless” mode:
the game must be running in the DPI-scaling mode —
Windows built-in mode for scaling old applications
not intended for using with high-pixel-density displays.
To force DPI scaling in Windows 10 for a game
even if the game is declared as HiDPI-compatible (DPI-aware),
override DPI mode to the “System” value in properties
of the game’s executable file (*.exe),
see details below in the next section;
the “Borderless” mode must be chosen in the game settings.
In different games, this mode may be called differently, e. g.:
Borderless,
Borderless Full Screen,
Borderless Windowed,
Windowed Fullscreen,
Fullscreen Windowed.
In some games, the mode called “Full Screen” is actually “Borderless”
instead of being true (exclusive) full-screen mode;
the system/in-game resolution ratio
must be equal to the OS-level zoom in Windows.
For example, if for a monitor of the resolution of 3840×2160 (4K) in Windows 10,
the zoom of 200% is set (the ratio is 2),
the resolution in game settings must be 1920×1080 (Full HD):
3840 / 1920 = 2
2160 / 1080 = 2
DPI awareness of applications in Windows
Windows automatically applies DPI scaling to applications and games not declared as HiDPI-compatible (DPI-aware).
With DPI scaling applied, user interface of the application is enlarged as a bitmap image with a ratio that matches the OS-level zoom.
For example, at the OS-level zoom of 200%, such applications are enlarged twice horizontally and twice vertically.
In order to prevent blur or pixelation due to DPI scaling in games, it’s important to make sure the game is in DPI-aware mode.
The criterion is simple: the game-window size in physical pixels should correspond to in-game resolution.
For example, window of a game running at Full HD resolution should occupy about 1/4 (1/2 horizontally and 1/2 vertically) of 4K screen at 200% OS-level zoom, not entire screen.
Games that are not DPI-aware require disabling DPI virtualization (DPI scaling) in executable’s properties, to have proper window size with no possibly blurry scaling automatically applied by Windows to non-DPI-aware applications.
DPI scaling for a specific game can be disabled via properties (the “Properties” context-menu item) of the game’s executable (*.exe).
“Properties” item → “Compatibility” tab → “Settings” section → “Disable display scaling on high DPI settings” checkbox.
In order to enable DPI scaling instead of disabling it, for a specific game in Windows 10 for the purpose of scaling in borderless mode, select the “System” item instead of “Application”.
For some games not declared as DPI-aware, Windows disables DPI scaling automatically.
This usually happens when switching for the first time from full-screen mode to windowed mode.
TVs
There is reportedly
(1,
2,
3,
4)
no blur in the “Graphics” mode
in some models of 4K TVs by Sony —
e. g. 65″ model of the X900E series, 55″ model of the X900H series,
and 42″ OLED TV of the A90K series (2022).
The mode can be enabled in settings of the TV:
“Settings” (⚙️ button on the remote control) → “Display & Sound” →
“Picture” → “Basic” → “Picture mode” → “Graphics”.
But when variable refresh rate (VRR) is enabled, the picture mode is
reportedly
locked to “Game” which adds blur at non-native resolutions.
Some 4K TVs by Panasonicreportedly support displaying Full HD signal with no blur.
For example, in the TX-55CX802B model, it is available via the “1080p Pixel by 4 pixels” option in the “Picture” → “Option Settings” menu.
The feature is apparently intended solely for use with Full HD (1920×1080) resolution and does not work at different resolutions of input video signal such as 1280×720.
That said, the similar smaller-size model — TX-50CX802 — based on the official manual, does not have the feature.
The feature is also available in the models TH-65AX900A, TX-50AX802, and TX-58DX750.
According to HDTVTest,
the 65-inchTX-65JZ2000B OLED TV
of the JZ2000 series () lacks this feature.
There is reportedly (1,
2)
no blur in the “Computer” input mode at resolutions of 1920×1080 (Full HD) and lower
in some models of 4K TVs by TCL based on the Roku TV platform
with firmware from —
e. g. 65R625.
But at least at 1920×1080 resolution, there is some
smoothing on edges