Tip: Use Nvidia DSR to enhance Retroarch shaders

CRT Royale, while often recommended as one of the best CRT shaders, has never quite looked right on my 1366x768 native res television. It’s a good TV and I don’t really notice the difference between 720p and 1080p with my eyesight anyway. What I do notice is that CRT Royale looks terrible on my screen and I always accepted this as a downside to using an old TV. CRT Royale is intended for 1080p or higher (and reportedly looks best in the 4k range). That said, I tried to play Seiken Densetsu 3 lately and had some difficulty with my favorite shader (NTSC Shadowmask) not handling SD3’s dynamic resolution changes well. I gave Royale another shot and wasn’t happy with the results, but then was reminded of an old idea I had to run it through Nvidia DSR to improve the quality of the shader.

NVidia DSR is a “supersampling” technology. Nvidia DSR runs your PC games at higher resolution than your monitor actually supports, and then downscales the image to your screen’s native resolution. It’s basically antialiasing for the whole screen. Instead of trying to detect aliasing, we just run the game at a resolution where the aliasing will not be noticeable at your native resolution.

While “aliasing” isn’t the exact problem that running a shader at 1366x768 gives me, the DSR method gives me the results I want. Essentially running Retroarch’s shaders at about 3K resolution (2723x1536). Nvidia DSR will run your GPU at 4x the resolution of your monitor, so 1080p would be able to go to 4k. I’ll explain my method of getting this working smoothly, but in the meantime, here are some comparison shots :slight_smile:. Keep in mind that these are displayed at 3K, so this is not what the actual image looks like on my screen (it is downscaled by the nvidia software). I’ve included a native comparison as well, but the 3K is scaled down by MS paint so not exactly accurate either. You would have to see it on the actual display to get the real picture. Nevertheless, from these comparisons, the improvement is clear.

Comparisons (2732x1536 screenshots – you need to zoom in on lower res displays)

  1. CRT Royale NTSC 256 Composite We can see that the DSR image is much smoother/cleaner, no blocky bright artifacts on the roof, for example (I’m not going to pretend I know the correct terms for this stuff, so forgive me). There is less obvious masking on the image, so the colors appear more vibrant (I think because there is less pixel resolution being used for the mask).

  2. CRT Royale (Vanilla) Similar to the 256p version, but the improvement is more pronounced.

  3. NTSC Shadowmask Greatly improved masking

  4. CRT Easy Mode Not much change, but improved clarity

  5. CRT Easy Mode (downscaled to native res by MS paint) Just here for an example to show that the changes and improvements “stick” even when downscaled back to native res.

After doing these comparisons I’ve decided that the improvement here is worth using all the time. I will in the future be running Retroarch in 2732x1536. I have been able to automate this and I will now give a brief tutorial.

  1. Set up NVidia DSR for your system (requires a supported GPU). A quick note on “smoothness”: To downscale, DSR needs to have some method of determining which part of the giant resolution screen to display on your native resolution’s individual pixels. Nvidia provides a “smoothness” slider which is basically a sharpness(0%) to bluriness(100%) slider. I found that the default 33% looked great on my screen but 0% would be the most “correct” to my understanding.

  2. Download “qres” (source() and place it in your Retroarch folder or Windows\system32.

  3. Go into Nvidia Control Panel and look under Display>Change Resolution. Find the DSR resolution that you want to use listed under “dynamic super resolutions” (if unsure choose the highest, only use lower if you have performance issues). Mine is 2732x1536

  4. Create a new batch file in your Retroarch folder (you can create a text file and rename it to .bat). In the batch file enter the following, replacing the DSR and native resolution arguments with the correct resolutions for your display.

Retroarch High Res.bat

qres /x 2732 /y 1536
retroarch
qres /x 1366 /y 768
exit

and save the file.

Now whenever you launch retroarch from this batch file, it will run in the higher resolution mode, and you will have super-sampled shaders.

Also here’s a bonus batch script I stuck on my start menu to swap the desktop between native res and DSR res, just in case I alt+tab or end up in the wrong res somehow.

fixres.bat

@echo off
for /f %%i in ('qres /s') do set VAR=%%i
if %VAR%==1366x768, goto s2hires
qres /x 1366 /y 768 >NUL
goto end

:s2hires
qres /x 2732 /y 1536 >NUL
goto end

:end
2 Likes

So once i have the batch file I don’t need to change the native desktop resolution to the DSR one? I tried it and it seems to be working but I am not entirely sure. Not seeing a difference between 1600p (native) and 3200p. I’ll do more test later.

This is very cool though, thanks for sharing!

Right – the batch file is just to avoid having to swap desktop resolution. It will return to native res after you close RA.

1600p is already pretty high so it might not make a huge difference for you I think. But there is phosphorlut-4k which requires at least 4k to run. You could check that out :slight_smile:

I tried phosphorlut-4k and it looks pretty bad on both resolutions. Even manually changing the monitor’s res to the DSR doesn’t help. Not really sure what I am doing wrong. Here is my batch file below.

qres /x 5120 /y 3200 retroarch qres /x 2560 /y 1600

Looks fine to me. If you did it manually and see no difference, then it probably just doesnt do much that high. I would image youd see the best gains when going up from 720 or 1080

4K DSR + CRT-Royale… I guess you need a pretty powerful GPU for that. :smiley:

My 970 eats up 3k can’t do 4k on my screen though :confused:

You don’t need to use qres to change the display mode, RetroArch can do that itself when you use non-windowed fullscreen.

It will set the display mode according to what you have set for video_fullscreen_x and video_fullscreen_y and video_refresh_rate, when switching to non-windowed fullscreen mode. It resets back to the original desktop resolution when you exit.

For example, this config will start up RetroArch in 3840x2160 fullscreen mode:

https://pastebin.com/raw/ChY0BzkT

2 Likes

I had the same idea a few years ago. It works pretty well, it’s also a great way to get full screen integer scaling at 1080p from 4k down to 1080p without major scaling artifacts.

http://www.screenshotcomparison.com/comparison.php?id=142321 http://www.screenshotcomparison.com/comparison/141712/picture:2

Thanks for this that is really helpful

This actually works for me! But RA crashes whenever i try to adjust the video settings through the menu.

EDIT: I managed to fix the crash, but i run into a strange problem whenever i launch a game. RA ends up taking up both of my monitors.