Nonblurry integer-ratio scaling

Summary

Issue

Full HD on a 4K monitor looks worse than on a Full-HD monitor.

This happens due to blur always added by monitors and graphics drivers when scaling, though at integer scaling ratios (e. g. 2 in case of FHD→4K) it could be avoided.

As a result, sharpness in 3D games is decreased, white lines are gray, and pixel art is not pixel art anymore.

Solution

Each logical pixel could be displayed as a square group of integer (2×2, 3×3) number of physical pixels of the same color.

Such lossless scaling could be built into graphics drivers, but this is still not done though 4K monitors are on the market since .

Live demo

Get involved

  • Sign the petition for nonblurry scaling in graphics drivers.
  • Vote for adding the feature to the AMD graphics driver.
  • Express your support in forums: nVidia, AMD, Intel.
  • Complain of blur to technical support of your GPU vendor: nVidia, AMD, Intel (1, 2).
  • Complain of blur to technical support of your monitor/TV manufacturer.
  • Ask about support for nonblurry scaling in comments to reviews of graphics cards, monitors and TVs in mass media.
  • Request the feature for game engines Unity, CryEngine.
  • Tell about the issue to as many people as possible.

Sign petition


What scaling is

The image on computer monitors and TVs consists of pixels. The number of pixels in horizontal and vertical directions is called resolution.

Scaling is resizing (changing resolution of) an image. It is needed if physical resolution of a monitor or a TV set is different from the resolution of the video signal it receives: e. g. if a game in the resolution of 1920×1080 (Full HD) is running in full-screen mode on a monitor with physical resolution of 3840×2160 (4K).

The blur issue

With all monitors, graphics cards and most TV sets, scaling always leads to losing sharpness at any scaling ratio. Such sharpness loss is perceived as blur and is irreversible quality loss.

But actually, blur is only inevitable if the monitor’s resolution is not a multiple of the signal’s resolution. For example, it’s impossible to display one logical pixel as 1.5 physical pixels, so we are forced to use interpolation that calculates average colors of adjacent pixels of the image which is subject to scale.

Integer-ratio scaling is the solution

If the scaling ratio 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 with no any diffusion of colors of sibling pixels.

Such lossless scaling is known as integer (integer-ratio, integer-factor, integral) scaling, pixel-perfect scaling, and pixel doubling (duplication).

More than Nearest Neighbour

Fractional ratios

The the “Nearest Neighbour” interpolation is lossless only at integer ratios of resulting and original images, but results in distortion at fractional ratios. Integer-ratio scaling is always lossless.

Blur can be avoided even if resolutions of display and image are not divisible: it’s enough to scale with an integer ratio so that the image fills the screen as fully as possible, and fill the rest screen space 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 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 — leftward and rightward.

Aspect-ratio correction

Also, the “Nearest Neighbour” algorithm does not allow for aspect-ratio correction. Such correction is needed e. g. for old games aimed at the aspect ratio of 4:3, but often used a decreased vertical resolution of 320×200 instead of 320×240, or 640×400 instead of 640×480.

Examples

Pixel art

The differences between blurry bilinear interpolation and lossless integer-ratio scaling are clearly evident on a pixel-art image:

Photos

See also the photos of the same screenshot of the Reaper application taken using the three scaling methods:

Demo

For better understanding of what nonblurry integer-ratio scaling is, see the web demo. It allows to compare an image scaled with an integer ratio with no blur and a regular blurry image. Viewing custom images is supported.

Use cases

Working at a resolution lower than native display resolution makes sense for the following purposes:

  • performance boost in games, especially on laptops;
  • ability to use 4K+ displays to play games not intended for HiDPI displays:
    • not scaling their user interface;
    • working incorrectly at 4K+ resolutions;
  • with nonblurry scaling — maintaining pixelation in old and pixel-art games.

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 senselessly decreases sharpness resulting in an unreasonable quality loss.
  • All 4K monitors use scaling with blur, so the issue can be solved only via graphics driver.
  • In the nVidia G-Sync mode, monitor’s own scaling feature is not used (1, 2, 3), so the only way to scale properly in modes with variable refresh rate (VRR) is scaling via graphics driver.
  • Graphics drivers of nVidia and AMD already have implemented technologies of resolution virtualization — nVidia DSR and AMD VSR, so the only missing technical thing is support for ratios below 1.
  • From the performance perspective, scaling by pixel duplication should work much faster than using bilinear or bicubic interpolation, so using integer-ratio scaling could descrease or remove a lag introduced by scaling.
  • User has a right not to have unreasonable quality loss when working at resolutions different from the physical resolutions of the display.
  • A faster graphics card has a higher heat emission (TDP) and increased cooler noise. This has a negative impact to user comfort, and results in irreversible hearing loss in the long term. To the same extent, this applies to a graphics card that has its computational power utilized to a higher degree than could be at a lower resolution.
  • A faster graphics card does not solve the issue since the issue is not just about performance (see below).

Even more important with higher native resolution

The higher native (physical) display resolution is, the more important and effective integer-ratio scaling gets.

  • The more the native display resolution is, the harder it is to achieve comfortable performance in games at it. The 4K resolution is fourfold higher than Full HD. The 8K (7680×4320) resolution is another 4 times higher.
  • The more the native display resolution is, the less noticeable a logical pixel is with the same display size and scaling ratio, so blur as a sort of smoothing gets even less reasonable. For example, a pixel on a 4K monitor can still be noticeable at the Full HD (1920×1080) resolution with a certain combination of display size, viewing distance and antialiasing quality in game. But with the physical resolution of 8K and the signal resolution of 4K, logical pixel under typical conditions will be totally indistinguishable.
  • It gets possible to use screen more fully with integer-ratio scaling. For example, at the resolution of 320×240 typical for DOS games, the height of a Full HD (1920×1080) display with an integer scaling ratio is used just for 89% (used 960 of 1080 pixels with the ratio of 4), while height of a 4K monitor is used entirely (scaling ratio is exactly 9).

    Original resolution Resolution after scaling Note
    FHD 4K 8K
    Ratio Height loss Ratio Height loss Ratio Height loss
    256×224
    SNES, Genesis
    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
  • It gets possible to use screen even more fully by using variable-size logical pixels with a difference of 1 physical pixel. The more physical pixels logical pixel contains, the less noticeable the difference of 1 physical pixel is.

    For example, for the resolution of 256×224 typical for 16 bit game consoles, the maximum integer ratio on a Full HD display is 4 (the full fractional ratio is 4.82), so 184 pixels are lost vertically by default, or 17% of the screen height. But if we increase the height of every second logical pixel by 1 physical pixel (4×5 instead of 4×4), then the lost height will decrease by 2.5 times — just 72 physical pixels will be lost, or 7% of the screen height. (For maintaining image aspect-ratio, image width should also be proportionally increased.)

    But the difference of 25% in height of pixels in adjacent lines on an FHD display can be noticeable. On a 4K display, the relative increase of pixel height is just 11% (9×9 → 9×10) and therefore much less noticeable. On a 8K display under similar conditions, the pixel-height difference is just 5% (19×19 → 19×20), while pixel-height increase in every 4th line decreases lost height by 8 times — from 64 to 8 pixels.

  • For displays with the 8K resolution, integer-ratio scaling will make it possible to use losslessly any of the typical resolutions: HD (1280×720, 6x), FHD (1920×1080, 4x), QHD (2560×1440, 3x), 4K (3840×2160, 2x).

Faster GPU is not a solution

Purchasing a higher-performance graphics card is not a solution:

  • 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);
  • in games based on pixel art, performance is not an issue, and the important thing is pixelated nature of the image with no inappropriate blur not corresponding to intention of the game authors;
  • 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;
  • 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.

A faster GPU cannot help here.

Partial solutions

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.

  • Nonblurry scaling is built into the Owlboy game () (an adventure platformer based on pixel art).
  • Nonblurry integer-ratio scaling is built into the QuakeSpasm game (a Quake version powered by a more modern engine) since the version 0.93.0 () with support for scaling ratios 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 scaling ratio. 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.
  • Nonblurry integer-ratio scaling is built into the Dusk game () (a retro-style 3D shooter) with support for scaling ratios 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.

Scaler software

  • For scaling Windows games that support windowed mode, the IntegerScaler utility can be used.
  • For scaling 3D games, the GeDoSaTo application can be used. 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.

  • The Glide wrapper (emulator) nGlide since the version 2.10 () supports nonblurry integer-ratio scaling (Options → Aspect ratio → Integer scaling).
  • DgVoodoo (Glide emulator and wrapper for DirectX 8 and older) and DXGL (OpenGL implementation of DirectDraw) reportedly support the nonblurry scaling algorithm “Nearest Neighbour” (sources: 1, 2).

Game-console emulators

  • The emulator of 8/16-bit game consoles higan for Windows since the version 104 () supports integer-ratio scaling (Settings → Video → Windowed Mode / Fullscreen Mode → Integral scaling). To prevent blur, uncheck the Settings → Video Emulation → Blurring checkbox, and switch the Settings → Video Shader option to the None value instead of the default Blur value.
  • In the SNES emulator bsnes for Windows since the version 107 (), the “Center” mode (Settings → Output → Center) automatically uses integer-ratio scaling. To prevent blur, uncheck the Settings → Output → Blur Emulation checkbox, and switch the Settings → Shader option to the None value instead of the default Blur value.
  • The SNES emulator Snes9x since the version 1.56.2 () supports integer-ratio scaling (Video → Display Configuration (Display Settings) → General → Integer Scaling). To prevent blur, uncheck the Video → Bilinear Filtering checkbox, and to prevent other distortions of original image, set both dropdowns Video → Display Configuration (Display Settings) → Output Image Processing to None.
  • The SNES emulator Snes9x EX+ for Android since the version 1.4.4 () supports integer-ratio scaling (Options → Video → Zoom → Integer-only). To prevent blur, switch the Options → Video → Image Interpolation option to the None value instead of the default Linear value.
  • The NES emulator puNES since the version 0.105 () supports integer-ratio scaling: Settings → Video → Misc → Use integer scaling in full­screen. To prevent blur, uncheck the Interpolation checkbox.
  • Cemu — an experimental emulator of the Wii U game console for Windows — since the version 1.15.2 () supports the “Nearest Neighbour” scaling algorithm (Options → General settings → Graphics → Upscale filter / Downscale filter → Nearest Neighbor). A custom resolution can be set on per-game basis via graphic packs (Options → Graphic packs).
  • The RetroArch frontend for game-console emulators supports integer-ratio scaling (Settings → Video → Integer Scale). To prevent blur, set the Settings → Video → Bilinear Filtering parameter to the Off value.
  • The BizHawk frontend for game-console emulators supports integer-ratio scaling (Config → Display → Scaling & Filtering → Expand pixels by integers only (e.g no 1.3333x)). To prevent blur, set the Final Filter parameter to the None value (default). But sometimes aspect ratio is wrong and pixel proportions are distorted.

OS virtualization

  • For running DOS applications — the DOSBox ECE emulator — an improved unofficial version of the DOSBox program with support for nonblurry integer-ratio scaling. Unlike the regular DOSBox version, the ECE version features true scaling not based on filters, so nonblurry scaling in full-screen mode is supported, scaling ratio is calculated automatically and is not limited to low values (3x in official DOSBox builds).

    A value of openglpp or surfacepp should be used for the output parameter in the [sdl] section of the configuration file (*.conf) for the game, or the parameter should not be specified at all. To disable aspect-ratio correction (e. g. for stretching 320×200 to the height of 240 corresponding to the ratio of 4:3) and switching to perfect square pixels, use the aspect=false parameter in the [render] section of the configuration file. Vertical synchronization (V-Sync) at output=openglpp can be enabled with the glfullvsync=true parameter in the [sdl] section. For more details, see the readme for the pixel-perfect patch included also in the DOSBox ECE distribution (README for pixel-perfect patch.txt).

    An example of DOSBox ECE configuration file for the “Epic Pinball” game:

    [sdl]
    fullscreen=true
    output=openglpp
    glfullvsync=true

    [cpu]
    cycles=4000

    [autoexec]
    mount C "."
    C:
    cd \EPICPIN
    PINBALL.EXE
    exit

  • The virtualization environment VirtualBox supports nonblurry scaling of the virtual machine’s screen in the range of 100–300%: Machine → Settings → Display → Screen → Scale Factor.

Viewing images and playing videos

  • For viewing images — the XnView application with the unchecked checkbox Tools → Options → View → High quality zoom → Enlarge. Limitation: the option is applied to all viewed images regardless of ratio of their size to size of the application’s window and using full-screen mode.
  • For playing videos — the MPC-HC player with the setting View → Options → Playback → Output → Resizer → Nearest neighbor. A limitation: the option is applied to all played videos regardless of ratio of their frame size to size of the application’s window and using full-screen mode.

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 jerkiness;
    • in full-screen-output mode, there is jerkiness 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;
    • the “Borderless” mode must be chosen in the game settings. In different games, this mode may be called differently, e. g. “Borderless Full Screen”, “Borderless Windowed” or just “Borderless”. 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 exactly equal to the zoom ratio 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

    To force DPI scaling in Windows 10 for a game even if the game is declared as HiDPI-compatible (DPI-aware), use properties of the game’s executable file (*.exe):

    “Properties” item → “Compatibility” tab → “Settings” section → “Change high DPI settings” button → “High DPI scaling override” section → “Override high DPI scaling behavior. Scaling performed by” checkbox → “System” dropdown item.

TVs

  • Some 4K TVs by Panasonic reportedly 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.
  • Nonblurry scaling is reportedly available in the “Graphics” mode in some models of 4K TVs by Sony — e. g. X900E.

Miscellaneous

  • ScummVM, the modern environment for running some old games like “Broken Sword”, uses the “Nearest Neighbour” algorithm for scaling in full-screen mode by default. There is also built-in scaling with the fixed integer ratios of 2x (200%) and 3x (300%) (“Options → Graphics → Graphics mode”) in windowed mode, but the global setting only applies to games with resolutions up to 320×240, while for games with higher resolutions, this should be specified per-game. The application is formally not DPI-aware, so to ensure nonblurriness, it’s recommended to disable DPI scaling in its executable-file properties. At fractional scaling ratios, the “Nearest Neighbour” algorithm causes distortion, so for games that don’t need aspect-ratio correction, it may make sense to use ScummVM in windowed mode in conjunction with integer-ratio scaling with the IntegerScaler program.
  • To disable unreasonable blur of images on web pages — the SmartUpscale extension for Firefox and Chrome browsers.
  • There is reportedly no blur when using full-screen scaling with integer ratios via the official Intel’s graphics driver for Linux operating system.
  • Since , the Raspbian operating system for Raspberry Pi mini computers supports scaling with no blur for the scale of 200% via the “Pixel Doubling” option in the “System” tab in the “Raspberry Pi Configuration” application.

Potential solutions

Hardware

  • Scaling built into monitor itself. The advantage compared with scaling via graphics driver is saving the graphics interface’s bandwidth and potential decrease of electromagnetic radiation from the signal cable.
  • device inserted between signal source and display. The advantage compared with scaling via graphics driver is the ability to use it with any signal source (e. g. a game console or a video player), not only a computer. Potential drawbacks:

    • an extra lag is possible;
    • may have a negative impact to compatibility with the HDCP technology required for playing protected content. Solvable with a switch for temporarily enabling the mode of passing-through the unaltered video signal. The switch could be either physical or controllable from computer via USB.

    There are similar devices:

    • mCable — HDMI cable with a built-in chip for increasing image quality in real time with applying noise reduction, antialiasing and sharpening with a stated lag of less than 1 ms;

    • DCHDMI intended to output video signal of the Sega Dreamcast game console via HDMI in the Full HD (1080p) format with support for integer scaling with 200% enlargement of the original image (640×480 → 1280×960);
    • UltraHDMI intended to output video signal of the Nintendo 64 game console via HDMI with no quality loss (review).

    Such device could probably be based on FPGA: 1, 2.

Software

  • Scaling via graphics driver.
  • Changing the architecture of graphics drivers in the Windows operating system so that the OS would have access to image on the screen at any moment regardless of the way the image was generated. So scaling with no blur could be done by the OS itself.
  • monitor emulator that intercepts the image to be displayed on monitor, scales it and displays the scaled image on the physical monitor.
  • Reverse engineering of existing graphics drivers with the purpose of enabling ability to upscale besides already available downscaling in the already available feature — nVidia DSR or AMD VSR.

What you can do

Regular users

  • Sign the petition on Change.org for implementing nonblurry integer-ratio scaling in graphics drivers.
  • Vote for adding the “GPU Integer scaling support” feature to the AMD graphics driver. Registration is not required.
  • Express your support in corresponding existing threads in forums of nVidia, AMD, Intel.
  • Complain of blur when scaling via graphics driver to technical support of your GPU vendor: nVidia, AMD, Intel (1, 2).
  • Complain of blur to technical support of your monitor/TV manufacturer.
  • Ask about support for nonblurry scaling in comments to reviews of graphics cards, monitors and TVs in mass media.
  • Tell about the blur issue to as many people as possible and provide links to the petition and to this article.

Game developers

  • Build integer-ratio scaling into games developed by them. In 3D games, this can be done with the Render-To-Texture technique and GPU-accelerated upscaling of the resulting texture using the “Nearest Neighbour” algorithm. The Unreal Engine has a built-in ability of scaling with no blur via the r.Upscale.Quality console variable with the value of 0.
  • Lobby adding integer-ratio scaling into popular game engines such as Unity, CryEngine, so that games based on them would automatically have the feature.

Algorithm

A ready-to-use algorithm of integer-ratio scaling with no blur. An algorithm is a sequence of actions for achieving the needed result.

Description

  1. Divide width (A) and height (B) of the screen in physical pixels correspondingly by width (C) and height (D) of the image to be scaled.
  2. Discard fractional part of the less of the resulting ratios. Give the resulting integer number the name of E.
  3. Represent each pixel of the original image as a square group of E×E physical pixels of same color equal to the color of the original image pixel. The width (F = C * E) and the height (G = D * E) of the scaled image in physical pixels will be E times greater than the width (C) and the height (D) of the original image correspondingly.
  4. Center the scaled image on the screen:

    1. subtract the width (F) and the height (G) of the scaled image in physical pixels from the width (A) and the height (B) of the screen, divide the results by 2, discard fractional part, give the resulting numbers the names of H and J correspondingly;
    2. display the scaled image at a distance of H horizontally and J vertically from the top-left corner of the screen.
  5. Fill the rest screen space around the scaled image with black.

Example

For example, it’s needed to display a 640×480 image on a 1920×1080 screen:

1920 / 640 = 3
1080 / 480 = 2.25

2.25 is less than 3. Discarding the fractional part 0.25 results in 2. So each pixel of the original image should be displayed as a group of 2×2 physical pixels.

The width and the height of the scaled image in physical pixels are 1280 (640 * 2) and 960 (480 * 2) correspondingly. So for the purpose of centering on the screen, the scaled image should be displayed at a distance of 320 ((1920 - 1280) / 2) pixels horizontally and 60 ((1080 - 960) / 2) pixels vertically from the top-left corner of the screen.

Reference rendering

The images below show how the result of nonblurry integer-ratio scaling must look. With a proper implementation of integer-ratio scaling, the results of scaling the provided original images must be identical to the provided reference renderings of scaled images.

To prevent affecting image appearance by the web browser, it’s recommended to save the images to your computer and view them with a standalone application at the zoom of 100%. You can also download all the images at once as an archive (80 KB).

Images Ratio Black background Note
Original Upscaled Full Integer Left +
right
Top +
bottom
320×240
qVGA, 4:3
3840×2160
4K UHD, 16:9
9
900%
480+480 0 Image at full height, black only at the left/right
640×480
VGA, 4:3
1920×1080
Full HD, 16:9
2.25
225%
2
200%
320+320 60+60
1280×720
HD, 16:9
1920×1080
Full HD, 16:9
1.5
150%
1
100%
320+320 180+180 Identical to the existing “Center” mode
1280×720
HD, 16:9
2560×1600
WQXGA, 16:10
2
200%
0 80+80 Image at full width, black only at the top/bottom
1920×1080
Full HD, 16:9
3840×2160
4K UHD, 16:9
2
200%
0 0 Resolutions are divisible, so no black background

User interface

Introduction

The simplest user interface for controlling nonblurry upscaling could be represented by a single checkbox “Prevent blur when upscaling” intended for enabling integer-ratio scaling with no blur.

A more flexible variant is to control blur and ratio integerness separately. That needs two settings:

  1. for disabling blur regardless of whether scaling ratio is integer or fractional — this just results in using the “Nearest neighbour” algorithm instead of bilinear interpolation;
  2. for using solely integer scaling ratios for preventing image distortion in the nonblurry-scaling mode.

Integerness makes sense mainly in combination with nonblurriness, so the second setting could only get available when the first one is enabled. But for more flexibility or for simplifying UI implementation, the two settings could be indepedent.

Each of the two settings can be represented by either a checkbox or a list of two mutually exclusive options with one selected by default.

Checkbox + pixel-size variability options

Probably the most user-friendly and intuitive user interface would consist of a checkbox like “Prevent blur when upscaling”.

Checking the checkbox would enable the “Nearest neighbour” upscaling algorithm and also make available an extra setting “Pixel size” with the two options available:

constant
(no image distortion, but black bars are possible around the image);
variable
(maximum usage of the screen space at the cost of some image distortion).

The text in parens could be displayed using a smaller font size, or dynamically displayed as a hint appearing when the user hovers the option with mouse cursor.

Separate filtering and integer-scale options

The user interface could be similar to the one used in RetroArch that provides two boolean (on/off) options in its video settings:

  • “Bilinear Filtering”;
  • “Integer Scale”.

The first one enables/disables blur, the second one enables/disables using solely integer ratios for pixel-perfect upscaling with no distortion of the image.

Such interface allows to combine blur and an integer ratio, but this doesn’t make sense in practice.

The terms “bilinear filtering” and “integer scale” might not be clear enough for non-advanced users.

Two new options in the flat list of upscaling modes

Two new options could be added to the existing list of the classic upscaling modes (“Center”, “Stretch”, “Maintain Aspect Ratio”):

  • “Prevent blur (maximum screen-space use, distortion is possible)”.
  • “Prevent blur and distortion (black borders are possible)”;

This UI variant is a trade-off between user-friendliness and technical simplicity of UI implementation.

Frequently asked questions (FAQ)

Is this the same as “Nearest Neighbour”?

Only partially. The results of using the “Nearest Neighbour” algorithm and integer-ratio scaling are only identical at integer scaling ratios — e. g. 2 or 3.

  • At fractional scaling ratios (e. g. 4.5 when scaling 640×480 to 4K), “Nearest Neighbour” leads to image distortion.
  • With integer-ratio scaling, the scaling ratio is always integer (e. g. exactly 4 in the 640×480→4K case) — regardless of the native-to-logical resolution ratio. The space that might be left empty due to nondivisibility of the resolutions is filled with black like in the “Center” mode.
How is this different from DSR/VSR?

DSR/VSR and integer-ratio scaling resize image in different directions, in different ways and for different purposes.

  • When using DSR/VSR, the image is rendered at a resolution higher than the native display resolution and then downscaled to the display resolution. In fact this is just SuperSampling antialiasing (SSAA) that can be used in games not having built-in support for such antialiasing.
  • When using integer-ratio scaling, the image is rendered at a resolution lower than the native display resolution and then upscaled (stretched) with no blur to the resolution less than or equal to the display resolution while using a highest possible integer scaling ratio.

The only thing that DSR/VSR and integer-ratio scaling share is the universal resolution virtualization transparent to operating system and software and compatible with all full-screen applications.

How is this different from resolution scaling?
The “Resolution Scaling” feature available in some games is intended for scaling by the game itself. Unlike using a resolution from a predefined set of resolutions, the feature allows to precisely find an optimal combination of detail and performance: e. g. if at the 2560×1440 resolution, performance is not enough, while at 1920×1080 it’s too high, it’s possible to choose 2560×1440 in the game and use resolution scaling for decreasing the resolution e. g. to 2400×1350. In the majority of games this feature results in blur even if the resolution-scaling ratio is integer. Integer-ratio scaling with no blur is free of quality loss caused by blur, and a proper implementation should be compatible with all full-screen applications.
How is this different from checkerboard rendering?
Like using a lower resolution, checkerboard rendering allows to increase performance. But checkerboard rendering has nothing to do with scaling: a 3D scene is rendered in a half resolution by rendering pixels checkerwise, then colors of missing pixels are calculated by averaging colors of sibling rendered pixels. Such approach is similar to interlacing typically used in TV broadcasting for video coding, and allows in games to achieve quality close to rendering at full resolution (e. g. 4K), but with almost double performance. With integer-ratio scaling with no blur, all image pixels are rendered, then the image is upscaled without altering it in any way and calculating any average colors.
How is this different from sharpening?
Integer-ratio upscaling with no blur has nothing to do with sharpening. Integer-ratio upscaling prevents quality loss caused by blur, while sharpening tries to improve legibility of an already blurry image.
Is this about disabling antialiasing?
No. Blur has nothing to do with antialiasing. Antialiasing is applied during rendering a 3D scene, while blur is added during upscaling an already rendered image as an array of pixels. Integer scaling can (and should) be used together with antialiasing. You enable antialiasing in the game, you disable upscaling blur in graphics driver, and you get a Full HD image on a 4K monitor with the same quality as on a monitor with the native Full HD resolution.
But wouldn’t pixels be noticeable without blur?

This is not always so, and is not necessarily bad when so.

  • Noticeability of pixels depends on a combination of the display resolution, the original-image resolution and the distance to the screen. For example, at the Full HD resolution on a 24″ 4K monitor at a typical distance of 50-60 cm from the screen, logical pixels are almost indistinguishable, so blur just unreasonably decreases sharpness.
  • Whether noticeable pixelation is appropriate depends on the type the original image: e. g. for pixel art, pixelation is an intended effect, so blur distorts the author’s intent.
Is this just for pixel art, emulators and old games?
No. Another crucially important use case of integer scaling is performance boost in modern 3D games at the Full HD resolution on a 4K monitor with no blur-caused quality loss compared with monitors with the native Full HD resolution.
But I like blur!
No problem. Integer-ratio scaling is meant to be an enableable/disableable (optional) feature. If you like blur, you could just not enable integer-ratio scaling in the settings of graphics driver or display.
Isn’t this built into OpenGL and DirectX?
In the 3D rendering APIs like OpenGL (the GL_NEAREST mode) and DirectX, the “Nearest Neighbour” algorithm is indeed available, but intended for scaling textures. While developers of a specific game could indirectly utilize this feature for integer-ratio scaling in this specific game, scaling textures is not directly related to universal full-screen scaling transparent to operating system and software.
Why use 4K monitor if play at Full HD anyway?
  • It’s not just about games:

    • comfort during working with text in any way (web surfing, text editors, programming, web development), drawings, charts is enormously higher on a 4K monitor than on a FHD monitor, thanks to the increased detail, invisible interpixel grid and greatly decreased “fussing around” sequential flickering of subpixels;
    • a higher native resolution allows to view photos at higher quality;
    • a higher native resolution allows to increase color depth (bit depth) with no flickering — by displaying average colors via sibling pixels displaying slightly different colors.
  • Even if the computer is fast enough for running games at the 4K resolution, not all games work correctly at this resolution: e. g. controls in “Cities XL Platinum” get too small; and in “Bionic Commando Rearmed”, conundrum elements are invisible in “Hack enemy network” sublevels.
  • The higher the native resolution is, the fuller the screen may be used with integer-ratio upscaling. For example, when scaling 320×240 to Full HD, 1/9 (11%) of the screen height is lost (filled with black) (1080/240 = 4,5), while on a 4K display, the ratio is exactly 9, so the image occupies the entire height of the screen. On displays with the 8K resolution, the same will apply to the 640×480 resolution; it will also be possible to use any of the typical resolutions with no loss of quality or screen space: HD (1280×720, 6x), FHD (1920×1080, 4x), QHD (2560×1440, 3x), 4K (3840×2160, 2x).
Shouldn’t this be handled by display?
A false dichotomy. Support for scaling by graphics driver does not contradict with the same support by the display, and vice versa. Even if new displays did start supporting nonblurry scaling, this wouldn’t help owners of existing displays, while graphics-driver scaling would.
Shouldn’t this be handled by operating system?
Windows doesn’t have access to screen contents in exclusive full-screen mode. To make it possible to implement full-screen scaling on Windows’ level, the Windows’ display-driver model (WDDM) would need to be fundamentally changed, and even in that case an extra lag would be possible compared with scaling via graphics-driver’s own means.
Isn’t DLSS a better method?

The DLSS method is not a universal solution:

  • available only on modern nVidia GPUs;
  • requires individual support by each specific game;
  • may introduce various unpredictable image artifacts;
  • intended for 3D games and not applicable to games of other types — e. g. based on pixel art.
What if the signal source is not a computer?
Yes, the signal source for a display might not necessarily be a computer, it could be e. g. a game console or a video player outputting video signal of a fixed resolution such as HD or FHD. In such cases, graphics-driver scaling can’t help and scaling should be done by the display itself. But this does not make the use cases for graphics-driver scaling less important in any way.

Progress

Monitors — announced for EVE Spectrum

Support for pixel-perfect integer-ratio upscaling is planned (1, 2) for the computer monitor being developed under the EVE Spectrum project based on community feedback.

The first monitor model will have the 2560×1440 (QHD) resolution at the 27″ size. It’s based on the LG 27GL850 LCD panel of the “Nano IPS” type with the response time of 1 ms and a refresh rate of up to 144 or 165 Hz. The variable-refresh-rate technology “FreeSync 2” is supported.

The approximate release date is late .

Intel — announced for Ice Lake (Gen10) CPUs

The announcement and the article

On , Intel announced support for nonblurry full-screen integer-ratio scaling via the Intel graphics driver for Windows. On , an article with details has been published on the Intel site.

Availability and system requirements

The feature is going to be available for enabling via the “Intel Graphics Command Center” application since or so.

A requirement is an 11th-generation (Gen11) GPU that will be used in the upcoming 10th-generation (Gen10) Intel CPUs (Ice Lake). The first Ice Lake CPUs are expected to release in late , the first devices will be laptops.

The Intel graphics driver and the “Intel Graphics Command Center” application require the operating system Windows 10 of version 1709 or higher.

Hardware support and performance

Intel graphics since the Gen11 have hardware support for the “Nearest Neighbour” scaling algorithm. Thanks to this, enabling nonblurry upscaling won’t affect performance.

In Intel GPUs of previous generations (10th and older), hardware support for “Nearest Neighbour” suitable for full-screen scaling was missing. So the feature implementation for them could only be pure-software that would be nontrivial and would result in too low performance.

Algorithms

Both variants of nonblurry upscaling will be available:

  • integer-ratio upscaling with a constant pixel size and no distortion of the image, but with possible black bars around the image;
  • the “Nearest Neighbour” algorithm with maximum usage of the screen area at the cost of some image distortion due to variable size of sibling pixels.

Minimal resolution

The minimal resolution that will be supported by the first implementation is 640×480. Support for lower or user-defined resolutions may appear in future versions of the Intel graphics software.

nVidia — limited support in Linux driver

Nearest Neighbour in nVidia Linux driver

The nVidia GeForce graphics driver for Linux, Solaris, and FreeBSD operating systems since the version 384.47 () provides the “Nearest Neighbour” scaling algorithm as a part of the “Transform Filter” feature. It can be enabled with a command like this:

nvidia-settings -a CurrentMetaMode="DP-1: 3840x2160_60 {ViewPortIn=1920x1080, ViewPortOut=3840x2160, ResamplingMethod=Nearest }"

where:

  • DP-1 is the video output the monitor is connected to;
  • 3840x2160 is the resolution of the signal received by monitor; must be equal to physical monitor resolution, otherwise there will be blur due to scaling done by the monitor;
  • ViewPortIn is the size of the rendering area in logical pixels;
  • ViewPortOut is the size of the resulting scaled image in physical pixels;
  • ResamplingMethod is a scaling algorithm (the default value is Bilinear).

The result of scaling may be smaller than physical monitor resolution. For example, to display a 1280×720 image with 2-times enlargement (with 2×2 pixels) centered on screen of monitor with physical resolution of 3840×2160, the following command is needed:

nvidia-settings -a CurrentMetaMode="DP-1: 3840x2160_60 {ViewPortIn=1280x720, ViewPortOut=2560x1440+640+360, ResamplingMethod=Nearest }"

where 640 и 360 are offsets in physical pixels from top left corner horizontally and vertically correspondingly, needed for centering the scaled image.

Commands can be executed via terminal that can be opened with the Ctrl+Alt+T keyboard shortcut.

Software implementation and performance

The only interpolation available on hardware level in nVidia GPUs is blurry bilinear interpolation, so the “Nearest Neighbour” scaling algorithm is implemented in software and uses some GPU power. This can potentially slightly decrease maximum GPU performance. In practice, performance is about the same regardless of interpolation type: «Nearest Neighbour» (Nearest) or bilinear (Bilinear).

Unfortunately in some games, using the transform filter itself leads to a serious performance drop. For example, in the “F1 2017” game at the resolution of 1280×720 when using transform filter, performance is lower that at the resolution of 1920×1080 in regular full-screen mode. When scaling the game running in windowed mode, performance is much higher than with full-screen scaling via transform filter, but still lower than in regular full-screen mode.

Windowed and pseudo-full-screen games only

Unfortunately the feature work only with windowed and pseudo-full-screen (rendered over OS desktop) games. The scaling is not applied to really full-screen games that switch monitor resolution (e. g. “Euro Truck Simulator 2”).

That said, in many games, the feature works incorrectly: the image is rendered at the resolution selected in the game’s settings (e. g. 1920×1080), then upscaled with blur to the ViewPortOut resolution (e. g. 3840×2160), then cropped to top-left or bottom-left part corresponding to the ViewPortIn (e. g. 1920×1080) size, and only this cropped part is then output to monitor.

The issue is not specific to a particular desktop environment and takes place at least in Unity (Ubuntu 17.04) and GNOME (Ubuntu 17.10).

When running a game in windowed mode, the visible part of the game window can be maximized by enabling automatic hiding of the Dock panel via Ubuntu settings (Settings → Dock → Auto-hide the Dock), and using the GNOME extension Hide Top Bar to autohide the top bar. To minimize the height of the title bar of the game window, it makes sense to switch OS-level zoom to 100%.

Mouse and resolution

A companion issue is that even if a rendered game output is visible entirely, its menus, buttons and other controls may be not accessible for mouse hovering and clicks if the desired logical resolution (ViewPortIn) was not chosen in the game’s settings before enabling the Nearest mode in the graphics driver.

This is because by default, the game may run at the output driver resolution (ViewPortOut) instead of the logical one (ViewPortIn). This may also lead to serious loss of performance: the game will be first rendered at the high resolution, then downscaled to the low one, then upscaled back to the high one using the “Nearest Neighbour” interpolation.

Official nVidia comments

One of the Linux-driver developers Aaron Plattner believes the issue is not with the driver, but with games incorrectly interpreting data received from the RandR software subsystem.

He admits that given the number of affected games, a universal game-independent solution for the issue would make sense. As a possible implementation of such solution, he mentions an LD_PRELOAD library that could intercept calls to libXrandr functions and fake the replies. That said, he doesn’t say whether such solution is going to be developed by nVidia itself and distributed together with the graphics driver.

Tested games

The table contains the results of testing some games at Full HD (1920×1080) virtual resolution on the Dell P2415Q monitor with 4K (3840×2160) physical resolution under Ubuntu 17.10 and 18.04.

Announced for Turing GPUs under Windows

Support for integer scaling has been announced on 2019-08-20 for Turing GPUs (RTX and GTX 16*).

The feature is not available in the Windows version of the nVidia GeForce driver for previous generations of nVidia GPUs. On March 25, 2019, an nVidia official stated that they have no plans to implement scaling with no blur in their graphics driver for Windows, while admitting that the algorithm itself is straightforward. As a reason, they refer to impossibility to implement this feature in the Windows driver in a way that wouldn’t require “ongoing continuous support” given that WDDM specs of graphics drivers in Windows 10 are consistently changed. That said, nVidia officials ignore questions about whether the same ongoing continuous support is required for the existing DSR technology that, as well, does resolution virtualization transparent to operating system and full-screen applications.

AMD — unavailable but included in poll

Integer-ratio scaling with no blur is unavailable in AMD graphics drivers. But AMD included this feature (“GPU Integer scaling support”) in the list of the potentially planned features in the poll intended to help determine what features are most demanded by users.

Linux — limited support in XRandR

The system Linux application XRandR for controlling the graphics subsystem allows to enable nonblurry scaling regardless of GPU vendor. The feature is available in the development version and can be enabled with a command like this:

xrandr --output DP-1 --scale 0.5x0.5 --filter nearest

where:

  • DP-1 is the video output the monitor is connected to;
  • 0.5 is the reduction factor: e. g. 0.5 on a 4K (3840×2160) monitor results in a virtual resolution of Full HD (1920×1080);

The video output can be seen in graphics-card control panel or in the list provided by this command:

xrandr | grep " connected " | awk '{ print$1 }'

XRandR 1.5, the latest stable version at the , supports scaling, but does not support the --filter parameter, so disabling blur is unavailable in the stable version. When trying to use the --filter parameter, the following error message is displayed:

xrandr: unrecognized option '--filter'

Installing development version of XRandR

Warning: installing development versions of fundamental system applications in Linux may affect functioning of the whole system, some of its functions or third-party software.

Development version of XRandR can be installed with the following command sequence:

git clone git://anongit.freedesktop.org/xorg/app/xrandr xr
cd xr
./autogen.sh
sudo make install

Before that, it may be required to install extra packages or development versions of some of already installed packages. For example, in a just installed Ubuntu 18.10, it’s enough to install the git, xorg-dev, xutils-dev, autoconf packages with the following commands:

sudo apt install git
sudo apt install xorg-dev
sudo apt install xutils-dev
sudo apt install autoconf

Only windowed and pseudo-full-screen games

Compatibility with games and limitations are similar to those of transform filters in nVidia Linux driver: scaling is only possible for games running in windowed or pseudo-full-screen (borderless) mode.

Some games in pseudo-full-screen mode are displayed cropped: for example, at in-game resolution of Full HD on a 4K monitor, only the bottom-left or top-left quarter of the image is typically visible. In true (exclusive) full-screen mode, an even smaller part of the image is visible, because not just a part of the original image is upscaled to native monitor resolution, but also the monitor switches to a lower resolution.