# How is non-integer upres downres (1080p game on a 1440p screen etc) calculated

Please redirect me if this is not the right place to ask.

I was unable to find a straightforward answer to this question. What I am wondering is, if I am playing a 1080p game on a 1440p display, what values will be actually displayed on the screen?

A very simplistic solution would be some form of interpolation, like bicubic. Seems reasonable enough, but is it actually what they do? What if I am playing a 1080p game on a 2160p screen (factor of 2)? Is there any significant difference between integer and non-integer scaling factors?

What if I am forcing the game to render more pixels than the display can show, which some games allow (run the game at 1440p but connect a 1080p display). You can set the render scale to 133%. If you do something like this, the rendered image will have more pixels and more fidelity, but almost none of them will have a 1:1 correspondence to the display. You could still interpolate the 1080p pixel values based on a 1440p rendered image, but intuitively, this seems like a huge disadvantage, but when you do this in practice, the image indeed looks better than when you have 100% render scale where every displayed pixel has a 1:1 correspondence to the rendered image.

If I rendered 2160p and displayed this on a 1080p screen, you could average every 2x2 pixels and display it on a single pixel, this seems simple enough, but is it actually what is done or is it indeed optimal?

Essentially I am asking if there is any genius trick to upresing and downresing images

Another heuristic question: Which would look better? A native 1080p 27" screen displaying a 1080p game, or a 1440p 27" screen displaying a 1080p game? Surely the native 1080p screen must look better? But by how much?

Assuming modern 3D games here.

most games you are aware of are not fixed-resolution – there's very rarely a 1080p game these days! The GPU only renders things onto a buffer the size of your screen's resolution when asked to (in the last step of the processing chain, basically), so games can simply have a fully relative-coordinate-system going on till the end.

So, the answer is: I bet what you think is a 1080p game isn't. Other than that, the physical dimension of the screen make absolutely no difference to the image generation – it's only the last step, where, no matter what the output resolution is, an operation is applied to get pixel values out of a 3D scene definition, consisting of polygons in a 3D coordinate system that has nothing to do with pixels.

You of course need to use appropriately many polygons for high resolutions; the textures you map onto these (and thus, things like static elements, menus etc) need to be right for the rendered resolution etc.

But: there's nothing "special" about the resolution; in any case, there's a projection from one coordinate system to the screen coordinate system (pixels) in a last (or close to last) step.

You could still interpolate the 1080p pixel values based on a 1440p rendered image, but intuitively, this seems like a huge disadvantage, but when you do this in practice, the image indeed looks better than when you have 100% render scale where every displayed pixel has a 1:1 correspondence to the rendered image.

That very much depends on the game you're looking at. In effect, shrinking with an appropriate scaling algorithm is a form of antialiasing setting. That's probably what you perceive as quality advantage: smoother edges.

If I rendered 2160p and displayed this on a 1080p screen, you could average every 2x2 pixels and display it on a single pixel

This should not be done (and rarely if ever is done today); it's a bad way of downscaling things. Signal theory tells us that when filtering with a boxcar filter (in this case, 2 samples wide) in spatial domain, you get ringing, and things look jagged.

GPUs have scalers, but even as simple shader, better scaling algorithms are easy to code.

• "rarely a 1080p game these days!" well I can always set the game resolution to 1080p even though I have a 1440p monitor (instead of setting the resolution to 1440 and render scale to 75%). Then would it be the monitor doing the interpolation? Visually, the difference between the two options isnt too great, I would need a macro lens and a tripod to have a one to one comparison though. Mar 15, 2021 at 2:38
• also a silly question but perhaps you are in the industry: when will we get nonuniform render scaling, i.e. 100% in the center half of the screen, 75% around, 50% at the very edges. the performance gains could be off the flippin chart my dude Mar 15, 2021 at 3:30
• Unless you switch the output resolution of your GPU, it's the GPU doing the scaling. But: projecting things onto surfaces (buffers) is just what GPUs do; there's no performance cost to that, it has to be done anyways. Mar 15, 2021 at 10:10
• @grdgfgr there would be exactly zero performance gains through that. Why would that bring any performance gains?! You can implement that today (for the last decade) using your own shader pipelines, what's the point? Mar 15, 2021 at 10:12
• the way you are explaining things, makes it seem like there is no difference between playing at 50% render scale and 200% render scale, that it's trivial for a gpu to get those extra pixels.. But in practice there would be a factor of 4-8 difference in terms of frames per second. i am unsure if we are even talking about the same thing. Mar 16, 2021 at 5:30