Integer-ratio upscaling with NO BLUR (e.g. FHD → 4K with logical pixel as 2×2 same-color physical pixels)

New ideas and suggestions.
User avatar
MT_
Posts: 18
Joined: Wed Jan 17, 2018 3:52 pm

Integer-ratio upscaling with NO BLUR (e.g. FHD → 4K with logical pixel as 2×2 same-color physical pixels)

Post by MT_ »

Hello. It would be nice for nGlide to support nonblurry integer-ratio upscaling. This image shows the difference between how monitors and GPUs currently do upscaling (to the left) and what we need instead (to the right):

Image

Please see also the live demo that allows to view any image with both types of scaling and the article that explains the issue in detail and attempts to collect and summarize all the relevant information.

Until the issue is not solved universally on monitors’ and/or GPUs’ side, nGlide could solve the issue at least for Glide-compatible subset of games.

For example, 1920×1080 (Full HD) could be upscaled to 3840×2160 (4K) with NO BLUR by representing each logical pixel as a group of exactly 4 (2×2) physical pixels of the SAME COLOR, unlike always-blurry scaling built into monitors and graphics drivers.

In the same way, 640×480 could be upscaled to 2560×1920 (with each logical pixel displayed as a group of 4×4 IDENTICAL physical pixels), the resulting image centered on the screen, and the rest space (640+640 horizontally and 120+120 vertically) filled-in with black (or with a custom color specified by the user in nGlide settings).

The feature is extremely demanded by 4K-monitor owners. There are corresponding nVidia (50+ pages), AMD and Intel forum threads, and a petition signed by 1400+ people.

In 3D applications, the feature can be implemented with the “Render-To-Texture technique and performant GPU-accelerated upscaling of the resulting texture using the “Nearest Neighbour” algorithm.

Is this feature on radar of the nGlide developers? Thanks.
Last edited by MT_ on Sat Apr 07, 2018 1:49 am, edited 23 times in total.
User avatar
Zeus
Site Admin
Posts: 1712
Joined: Sun Sep 21, 2008 2:51 pm
Contact:

Re: Lossless nonblurry integer-ratio upscaling by pixel duplication (e.g. FHD → 4K with no blur)

Post by Zeus »

Hello,

nGlide already supports rendering at custom resolutions. If a resolution isn't listed in nGlide configurator all you need to do is to set it to "Resolution: By desktop" and your desktop to a custom resolution created in a display driver panel.

But yeah, for convenience I will add 2560x1920 into resolution list in the next release.
yrbrkfstdspsbl875943
Posts: 9
Joined: Mon Jan 22, 2018 6:50 pm

Re: Lossless nonblurry integer-ratio upscaling by pixel duplication (e.g. FHD → 4K with no blur)

Post by yrbrkfstdspsbl875943 »

Zeus wrote:Hello,

nGlide already supports rendering at custom resolutions. If a resolution isn't listed in nGlide configurator all you need to do is to set it to "Resolution: By desktop" and your desktop to a custom resolution created in a display driver panel.

But yeah, for convenience I will add 2560x1920 into resolution list in the next release.
This is a misunderstanding. The main issue is not a missing resolution. The main issue is how a low resolution frame is being up-scaled to the native resolution of the monitor. Here is a picture for comparison.
Image
The lower row shows the result for the current up-scaling method. As you can see it introduces blur and the higher the up-scaling ratio the worse it gets.
Only the upper row provides a true retro-look for up-scaled pictures rendered at a low resolution. And some players with a good taste for nostalgia might actually want to render a game at a low resolution on purpose to make it look as it did 20 years ago.
Right now GPUs only support automatic up-scaling with the lower method. However the upper method can be implemented in software by modifying the source-code of the game (or in this particular case the source-code of the glide compatibility layer).

Here is the 48-page topic previously mentioned by MT: https://forums.geforce.com/default/topic/844905/
An example how to implement this up-scaling method by using OpenGL (without having to write any shader-code) can be found on page 35 of that topic.
Basically it just requires to render the frame into a texture instead of a back-buffer and then render the actual back-buffer by re-sampling the texture with the nearest-neighbor sampling method.
User avatar
Zeus
Site Admin
Posts: 1712
Joined: Sun Sep 21, 2008 2:51 pm
Contact:

Re: Integer-ratio upscaling with NO BLUR (e.g. FHD → 4K)

Post by Zeus »

^ nGlide uses uprendering not upscaling. I don't know where you got this information.
User avatar
MT_
Posts: 18
Joined: Wed Jan 17, 2018 3:52 pm

Re: Integer-ratio upscaling with NO BLUR (e.g. FHD → 4K)

Post by MT_ »

Looks like I should double-check whether there is blur in nGlide-powered games at FHD resolution on 4K monitor. I’ll post results here once I have them. Thanks for your attention, Zeus.
yrbrkfstdspsbl875943
Posts: 9
Joined: Mon Jan 22, 2018 6:50 pm

Re: Integer-ratio upscaling with NO BLUR (e.g. FHD → 4K)

Post by yrbrkfstdspsbl875943 »

Zeus wrote:^ nGlide uses uprendering not upscaling. I don't know where you got this information.
Another misunderstanding.
Nobody said that nGlide does upscaling. The monitors or the GPUs do the up-scaling (depending on whether GPU based scaling is enabled by the driver or not). The problem is that both of them do it in an ugly way that produces blur. This problem is not limited to nGlide.
All the games that render in low resolution suffer from it. It's a massive problem for retro-gamers. Try playing a game in a resolution of 640x480 (or even better 320x240) on a 4K-monitor. It's going to look like a smeared out oil painting! I can insert some better pictures.
The point is that nGlide could solve the problem at least for the old Glide-based games. All it needs to do is doing the up-scaling by itself in the correct way instead of letting the monitors and the GPUs do it.
(And by the solution I don't mean rendering the game in a higher resolution than the games asks for. This is what you mean with uprendering, right? I mean rendering the game in the original resolution and then upscaling the rendered frames to the monitor's resolution, but in a different way that doesn't produce a blurry mess.)
yrbrkfstdspsbl875943
Posts: 9
Joined: Mon Jan 22, 2018 6:50 pm

Re: Integer-ratio upscaling with NO BLUR (e.g. FHD → 4K)

Post by yrbrkfstdspsbl875943 »

Hopefully these pictures will finally resolve all the misunderstandings.

This is how Quake 1 currently looks like on a 4K-monitor when rendered with a resolution of 320x240: https://i.imgur.com/tEnETPY.jpg
This is how it's actually supposed to look like (and how we want it to look like): https://i.imgur.com/cIVZl9n.jpg
(There is a slight quality degradation due to JPEG compression, but hopefully the pictures will still get the point across.)

Here are more examples:

Blurry: https://i.imgur.com/SENkoTh.jpg
Sharp: https://i.imgur.com/Uh4C6tI.jpg

Blurry: https://i.imgur.com/Ib2CZ4W.jpg
Sharp: https://i.imgur.com/ZRMVIKH.png
User avatar
MT_
Posts: 18
Joined: Wed Jan 17, 2018 3:52 pm

Is the blur issue clear enough?

Post by MT_ »

Zeus, is the blur issue now clear enough to you? Thanks.
User avatar
Zeus
Site Admin
Posts: 1712
Joined: Sun Sep 21, 2008 2:51 pm
Contact:

Re: Integer-ratio upscaling with NO BLUR (e.g. FHD → 4K with logical pixel as 2×2 same-color physical pixels)

Post by Zeus »

I'm surprised one would choose non-blurred upscaling over uprendering as this is clearly an inferior method.

I can add integer upscaling option to nGlide for people who would like to feel "more retro", but looking at things globally this is not the right way to do it. To me, it's like fixing an incompetent drivers programming because such option should be available in graphics drivers, not here.

On the other hand, the thread at nVidia forums is now almost 3 years old and they clearly don't give a damn, so maybe you're right, maybe I should think about it...
yrbrkfstdspsbl875943
Posts: 9
Joined: Mon Jan 22, 2018 6:50 pm

Re: Integer-ratio upscaling with NO BLUR (e.g. FHD → 4K with logical pixel as 2×2 same-color physical pixels)

Post by yrbrkfstdspsbl875943 »

Zeus wrote:but looking at things globally this is not the right way to do it. To me, it's like fixing an incompetent drivers programming because such option should be available in graphics drivers, not here.
I think we all agree on that ;).

The obvious sad truth is: All of those popular GPU makers (nvidia, amd, intel) are giant companies. And that results in an decision making process which is accordingly sluggish. Not to mention that they want to keep their corporate secrets. That results in little to none communication with the unsatisfied users.

One of those nvidia members mentioned in that topic that their GPUs have some dedicated hardware for the up-scaling. And that hardware is only capable to do bilinear up scaling. That might be a major boulder in their way. But that doesn't mean that circumventing that boulder is impossible, since (as my example code based on OpenGL shows) the proper sharp scaling is possible even in user space and without losing hardware acceleration.

If nGlide had this then more users would realize what's possible and hopefully that would result in more pressure towards the GPU makers.
Post Reply