Skip to content

Conversation

linckosz
Copy link

Video Super Resolution (VSR) for Moonlight

Video Super Resolution (VSR) is to video what DLSS is to 3D rendering.
So why not make Moonlight one of the first game streaming solutions to leverage this technology?
AI upscaling significantly reduces bandwidth usage without compromising video quality!

Tested GPUs:

  • Nvidia RTX 4070 Ti (Windows)
  • AMD RX 7600 (Windows)
  • AMD iGPU 780M (Windows)
  • Intel Arc A380 (Windows)
  • Intel UHD Graphics (16EU) – iGPU from N95 CPU (Windows)
  • Apple M1 Pro (macOS)
  • Apple M3 Pro (macOS)

Context

Video Super Resolution (VSR) is to video what DLSS is to 3D rendering.
So why not make Moonlight one of the first game streaming solutions to integrate this technology?
AI-based upscaling drastically reduces bandwidth usage while maintaining excellent video quality.

NVIDIA, Intel (link in French), and more recently AMD have all started promoting their respective AI-powered video enhancement technologies.


Implementation

Implementing VSR was not straightforward. I had to add a Video Processor component to D3D11VA to offload frame processing from the CPU to the GPU, allowing it to take advantage of additional GPU capabilities.

  • A UI checkbox was added in SettingsView.qml.
  • The core implementation logic is in d3d11va.cpp.

Platform-Specific Details:

NVIDIA: Provides VSR and HDR enhancement. I successfully implemented VSR for SDR content but have not yet managed to get HDR working (more details below).
Intel: Provides VSR, but the results are significantly inferior to AMD and NVIDIA.
AMD: Released AMF Video Upscaling, which delivers impressive results.


Additional Development (iOS)

For those interested in VSR for iOS, I have also developed moonlight-ios-MFX, but this is still a work in progress.

On an iPhone 13 Pro, the upscaler works well but is too power-hungry due to the Metal renderer (not the upscaler itself), making it impractical for now.
It may perform better on newer iPhone models, but I haven't tested them yet.

I don't have an Apple TV, but it could potentially work with minor adjustments and additional testing.
I won’t be maintaining the iOS version, so feel free to contribute and improve it!


Results & Comparisons

Resolution Test:

Resolution Test

Banding Test:

Banding Test

@linckosz
Copy link
Author

linckosz commented Mar 15, 2025

Here is a summary of my observations following many tests conducted with different settings and multiple GPUs. AMD delivers the best results, followed by Nvidia, then Intel. VSR (Video Super Resultion) performs exceptionally well in SDR, but HDR setup (in the code) is challenging, and some specifics feature (like sharpening) aren't yet avaible due to drivers limitation. I would advise using the Video Enhancement feature without HDR.

1) Nvidia RTX 4070 Ti:
I recommend setting the driver setting "Super resolution" quality to at least 3. Below this, it's still good, but you can start to see very small artifacts (white borders) around high-contrast objects. Nvidia has a robust VSR algorithm; the picture reconstruction is very well executed, and the deblocking method is quite efficient. During fast motion (tested on Trackmania) at mid/low bitrate (below 50Mbps), block artifacts due to the picture compression from the host are less noticeable, and some details are reconstructed (but less than a static screen).

2) Intel Arc A380:
Although Intel's VSR feature has been in an experimental stage since 2023, it offers interesting results with a sharp and deblocked picture. Compared to Nvidia, it is quite close to a Quality 1 settings. An advantage of Intel is that no settings have to be activated on the driver's side; another one is that their algorythm works since the 10th generation (Sky lake with iGPU). During fast motion at mid/low bitrate, Intel's solution tends to be pixelized and too sharped.

3) AMD RX 7600:
AMD's solution upscales the picture using the FSR 1.1 algorithm, and is the most efficient one.
Nvidia might have a slightly better reconstruction processfrom static picture, but AMD's rendering looks cleaner and sharper.
The biggest advantage with AMD's FSR method is that in fast-paced movement the picture is very clear and with details reconstructed. At 150 Mbps the rendering result is very close to the source.
But one area AMD is less performant it is in office use at low bitrate (less than 50Mbps) with more static screens. For instance, when switching between two very contrasted pictures, it reveals the picture going from slightly blurred to clear within 1 second, even if if such contrast does not happen often, it could be annoying for office use. A higher bitrate (more than 50Mbps) is recommended.

4) Intel UHD Graphics Xe-LP (iGPU)
This iGPU is from a N95 CPU (12th Gen, Alder Lake), the result is similar as the Arc A380, so I did not add screenshots for it.
But because a N95 is slow, I could only max out at 1440p 60fps 150Mbps, unlike a A380, adding more fps will add a tremendous amount of decoding time probably due to the fact that enhancement computation takes more time than one frame to be rendered.
This Intel VSR feature is available from the 10th Gen (Sky Lake) iGPU.

Does the feature "Video Enhancement" have an impact on the performance?
It is too low to be noticeable.
For a streaming at 1440p 120fps 150 Mbps, an additional latency less than 1ms in most of the cases, at the maximum I observed 2ms. This is true for any dedicated GPU, including entry-level.
As for iGPU, an entry-level like the N95 may reach some computation threshold and the framerate may need to set to 60fps max.

Does HDR work with Video Enhancement?
Yes, it can be activated.
VSR performs exceptionally well in SDR, but HDR setup (in the code) is challenging, and some specifics feature aren't yet available due to drivers limitation.
Intel handles it pretty well.
AMD does a pretty good job too to handle it, but the upscaling feature cannot be used at its full potential, cannot use a sharpening option, and FSR 1.0 needs to be used instead of FSR 1.1.
Nvidia does not support HDR yet so the application automatically disables the enhancement feature. Nvidia is working on it to enable upscaling with HDR (no date anounced yet).

Below are my suggestions for different scenarios with varying settings from host to display (Host->Stream->Display):

My suggestion for Office: 1440->1440->1440
Even though configurations like 1440->1080->1440 or 1080->1080->1440 provide good results with sharp and readable fonts, maintaining a 1:1 pixel ratio in the pipeline helps to achieve the clearest fonts.

My suggestion for Games: 1080->1080->1440
Thanks to the picture reconstruction algorithms in place (especially from Nvidia and AMD), which do an excellent job, the picture rendering quality at an equal video bitrate is actually better (sharper) than a 1440->1080->1440, and very close to a 1440->1440->1440 pipeline. No blur effects are observed due to the upscaling. Nevertheless, using 1080p for the host can help to increase FPS, and streaming at 1080p reduces latency, making it easier to stream at a high framerate than 60fps.


GPU comparison (1440->720/1080->1440 / 150 Mbps / Static picture):

Comparison


In-motion block artifact comparison at low bitrate (1440->1080->1440 / 20 Mbps):

Block


In-motion GPU comparison:

When upscaling (stream at 720 or 1080 to render on a 1440 display), in all scenarios AMD provides the best result.
Compare to Nvidia, which is already very good, AMD provides slithly sharper picture with a better reconstruction for small details (like tree branches). AMD is also the only solution which applies an Anti-aliased rendering. Surprisingly from AMD, at 150Mbps, an upscaled 1080p resolution provides better rendering than streaming at the native resolution 1440p thanks to the AA feature and a good reconstruction.
Nvidia is slightly below AMD because no AA applied.
As for Intel, we can still see that the solution is a work in progress, in all resolution at any bitrate, the rendering is too sharp and pixelized.
The current version (v5.0.1) is always blured, giving the feeling of a more flattened 3D picture.

When we use native resolution (stream at 1440 to render on a 1440 display), v5.0.1, AMD and Nvidia are all similar, only Intel still give a pixelized picture.

Fast-paced Picture Comparison (720p@150)
Fast-paced Picture Comparison (1080p@40)
Fast-paced Picture Comparison (1080p@80)
Fast-paced Picture Comparison (1080p@150)
Fast-paced Picture Comparison (1440p@150)


Resolution comparison (Nvidia Quality 4):

  • 1440->1440->1440
  • 1080->1080->1440
  • 1440->1080->1440

01_1440_1440
02_1080_1080
03_1440_1080


720p GPU comparison (1440->720->1440 / 150 Mbps):

  • Source
  • Moonlight v5.0.1
  • Nvidia RTX 4070 Ti
  • Intel Arc A380
  • AMD RX 7600

720p - Source
720p - Moonlight v5 0 1
720p - Nvidia RTX 4070 Ti
720p - Intel Arc A380
720p - AMD RX 7600


1080p GPU comparison (1440->1080->1440 / 150 Mbps):

  • Source
  • Moonlight v5.0.1
  • Nvidia RTX 4070 Ti
  • Intel Arc A380
  • AMD RX 7600

1080p - Source
1080p - Moonlight v5 0 1
1080p - Nvidia RTX 4070 Ti
1080p - Intel Arc A380
1080p - AMD RX 7600

@linckosz
Copy link
Author

Here is a comparison on a Macbook M1 Pro.

MacOS

@linckosz
Copy link
Author

@cgutman ,
I cleaned my original branch, but the previous pull request (#1180) closed automatically, so I had to create a new PR.
For the new branch, I used the Rebase method instead of Merge, which should be easier for you to implement it.

@andygrundman
Copy link

There is a lot of reformatting going on and it makes it difficult to review the changes. Can you disable whatever auto-formatting it is that you're running? Removing trailing spaces if there are any is OK though.

@linckosz
Copy link
Author

@andygrundman ,
Sure, I can do fix it.
Can you point out few lines as example to make sure I understand what you are expecting?

@andygrundman
Copy link

Sure, stuff like this, where there is no actual change, just reformatting. It looks like it's trying to line things up to the brace for some reason. The only time you want to auto-format existing code is is if a project is already using a tool and there is a config file in the repo (like Sunshine which has a .clang-format). And the one exception of trailing spaces which should be fixed (that comes from the olden days when you might send a patch via email where trailing spaces would get lost and cause annoying conflicts).

Screenshot 2025-03-19 at 16 28 25

@linckosz
Copy link
Author

@andygrundman ,
The formatting issues are fixed

@fidoboy
Copy link

fidoboy commented Mar 27, 2025

Is there any test build with this feature available for Windows platform? Where can I download it?

@moi952
Copy link

moi952 commented Mar 27, 2025

Is there any test build with this feature available for Windows platform? Where can I download it?

Here
https://ci.appveyor.com/project/cgutman/moonlight-qt/builds/51731322/job/fntsewbjxekye2v2/artifacts

@fidoboy
Copy link

fidoboy commented Mar 27, 2025

Is there any test build with this feature available for Windows platform? Where can I download it?

Here https://ci.appveyor.com/project/cgutman/moonlight-qt/builds/51731322/job/fntsewbjxekye2v2/artifacts

Thanks a lot. I'll check it :)

@fidoboy
Copy link

fidoboy commented Mar 27, 2025

After downloading the Windows build I've done some rapid tests and it doesn't seems to be working at all in my case. My setup is as follows:

Host machine: Running at 1440p HDR (AMD Radeon Adrenaline driver)
Moonlight setup to stream at 1080p HDR 60FPS
Client machine on Windows desktop at 1440p on Intel integrated GPU (Intel UHD graphics)

First I've enabled the new check box to activate the Upscaler enhancer. Connected to host with no issues but however the overlay info doesn't reflect any upscaler feature (pressing CTRL + ALT + SHIFT + S)

Then to compare, i've deactivated the checkbox so the stream should be pure 1080p without any enhancement. To my eyes the image quality is identical, there is no difference. So I believe that I must be doing something wrong or the feature is not working. It could be helpful if, at least, the streaming overlay info could display something to know if the enhancer is being used or not.

I've also tried lowering the host machine to 1080p while keeping the client working on 1440p and always selecting 1080p in Moonlight settings, but no difference. May be I'm missing something or may be the Intel GPU is not compatible with this experimental feature.

@fidoboy
Copy link

fidoboy commented Mar 28, 2025

Can't get this working. Is this feature using this library: https://github.com/OpenVisualCloud/Video-Super-Resolution-Library ? or it's only enabling some features already present into the GPU drivers? If this depends of the installed drivers then it should detect it before displaying the checkbox or at least display any warning, because right now I can just enable or disable it and the image quality is the same, it's just identical, no changes.

@linckosz
Copy link
Author

Can't get this working. Is this feature using this library: https://github.com/OpenVisualCloud/Video-Super-Resolution-Library ? or it's only enabling some features already present into the GPU drivers? If this depends of the installed drivers then it should detect it before displaying the checkbox or at least display any warning, because right now I can just enable or disable it and the image quality is the same, it's just identical, no changes.

Hi @fidoboy ,
Which CPU are you using?
I don't have my Intel N95 CPU to test it until end of may, but at least I will try with the Arc.
For reference, here is a test I've done last year with a N95:
#1180 (comment)

If you are able to check the box, it means that your iGPU has this feature capability, otherwise it will be greyed out.
This is not using this library (https://github.com/OpenVisualCloud/Video-Super-Resolution-Library) as this is a CPU feature leveraging AVX-512 tech, not a GPU's feature, it's good for video conversion but not for real time streaming. I am using IntelVpSuperResolution which can be found in chromium code and testable using Chrome here (https://www.clubic.com/pro/entreprises/google/actualite-460350-video-super-resolution-au-tour-d-intel-d-ameliorer-nos-videos-sur-chrome.html). You can try a youtube video with IntelVpSuperResolution enabled, if you can make it work with Chrome, it should also work for moonlight as I am using exactly the same method.

When you stream at a lower resolution than your screen, make sure you use borderless fullscreen or fullscreen, select hardware acceleration and that the overlay stats is displaying "AI-enhanced" like below while streaming.
image

@fidoboy
Copy link

fidoboy commented Mar 30, 2025

Can't get this working. Is this feature using this library: https://github.com/OpenVisualCloud/Video-Super-Resolution-Library ? or it's only enabling some features already present into the GPU drivers? If this depends of the installed drivers then it should detect it before displaying the checkbox or at least display any warning, because right now I can just enable or disable it and the image quality is the same, it's just identical, no changes.

Hi @fidoboy , Which CPU are you using? I don't have my Intel N95 CPU to test it until end of may, but at least I will try with the Arc. For reference, here is a test I've done last year with a N95: #1180 (comment)

If you are able to check the box, it means that your iGPU has this feature capability, otherwise it will be greyed out. This is not using this library (https://github.com/OpenVisualCloud/Video-Super-Resolution-Library) as this is a CPU feature leveraging AVX-512 tech, not a GPU's feature, it's good for video conversion but not for real time streaming. I am using IntelVpSuperResolution which can be found in chromium code and testable using Chrome here (https://www.clubic.com/pro/entreprises/google/actualite-460350-video-super-resolution-au-tour-d-intel-d-ameliorer-nos-videos-sur-chrome.html). You can try a youtube video with IntelVpSuperResolution enabled, if you can make it work with Chrome, it should also work for moonlight as I am using exactly the same method.

When you stream at a lower resolution than your screen, make sure you use borderless fullscreen or fullscreen, select hardware acceleration and that the overlay stats is displaying "AI-enhanced" like below while streaming. image

The CPU is Intel Celeron N4500 and I can check or uncheck the checkbox, it's not grayed out. But It doesn't display that overlayed info like yours. Mine shows HEVC 10bit only but there is not "AI Enhanced" text when the feature is enabled. What else can I try?

@fidoboy
Copy link

fidoboy commented Mar 30, 2025

I'm using this build: https://ci.appveyor.com/api/buildjobs/fntsewbjxekye2v2/artifacts/MoonlightPortable-x64-r2725.zip

The new checkbox is being displayed, it's not grayed out but I does nothing. The image quality is identical when the feature is activated or when it's not and the overlay stats does display nothing about "AI-Enhanced"

I've done my tests with 1440 -> 1080 -> 1440 and also 1080 -> 1080 -> 1440. There is no changes when the feature is activated, image is exactly the same

I'm sorry but I doesn't have Chrome to test. I never use that browser

@linckosz
Copy link
Author

I'm using this build: https://ci.appveyor.com/api/buildjobs/fntsewbjxekye2v2/artifacts/MoonlightPortable-x64-r2725.zip

The new checkbox is being displayed, it's not grayed out but I does nothing. The image quality is identical when the feature is activated or when it's not and the overlay stats does display nothing about "AI-Enhanced"

I've done my tests with 1440 -> 1080 -> 1440 and also 1080 -> 1080 -> 1440. There is no changes when the feature is activated, image is exactly the same

I'm sorry but I doesn't have Chrome to test. I never use that browser

Yes, that the correct version.
Apparently you have HDR enabled (it says 10bit), can you try without HDR? As VSR still at experimental stage for Intel, maybe it doesn’t work yet with HDR enabled.

@fidoboy
Copy link

fidoboy commented Mar 30, 2025

I'm using this build: https://ci.appveyor.com/api/buildjobs/fntsewbjxekye2v2/artifacts/MoonlightPortable-x64-r2725.zip
The new checkbox is being displayed, it's not grayed out but I does nothing. The image quality is identical when the feature is activated or when it's not and the overlay stats does display nothing about "AI-Enhanced"
I've done my tests with 1440 -> 1080 -> 1440 and also 1080 -> 1080 -> 1440. There is no changes when the feature is activated, image is exactly the same
I'm sorry but I doesn't have Chrome to test. I never use that browser

Yes, that the correct version. Apparently you have HDR enabled (it says 10bit), can you try without HDR? As VSR still at experimental stage for Intel, maybe it doesn’t work yet with HDR enabled.

I forgot to say that I've also tried without HDR enabled in moonlight settings. The result is the same. There is no "AI-Enhanced" text in the overlay info.

@fidoboy
Copy link

fidoboy commented Mar 30, 2025

This is with HDR enabled:

222327

and this is with HDR disabled:

222228

in both cases the AI Enhacer is checked but it seems that it's not being used

@jasperaelvoet
Copy link

Works on macOS 15.4 with m3 cpu.

Tested with 1080p host → 1080p stream → 1080p display, at 150mbps.

It would be great to have a slider to select how much the image is sharpened, it looks over sharpened right now imo.

Default:
Screenshot 2025-04-05 at 23 15 29

AI-enhanced:
Screenshot 2025-04-05 at 23 15 01

The added latency might be an issue on fast-paced games.

@linckosz
Copy link
Author

linckosz commented Apr 6, 2025

Works on macOS 15.4 with m3 cpu.

Tested with 1080p host → 1080p stream → 1080p display, at 150mbps.

It would be great to have a slider to select how much the image is sharpened, it looks over sharpened right now imo.

Default: Screenshot 2025-04-05 at 23 15 29

AI-enhanced: Screenshot 2025-04-05 at 23 15 01

The added latency might be an issue on fast-paced games.

Hi @jasperaelvoet ,
Here is the code for Mac to enable video super resolution, unfortunatly there is no option available to set the sharpening in the code.

MTLFXSpatialScalerDescriptor* Cdescriptor = [MTLFXSpatialScalerDescriptor new];

MTLFXSpatialScalerDescriptor documentation
https://developer.apple.com/documentation/metalfx/mtlfxspatialscalerdescriptor

@linckosz
Copy link
Author

linckosz commented Apr 7, 2025

Hi @fidoboy ,
Bug fixed, you can now download the new artifact (r2743) to try.
I finally could reproduce the issue with my Intel A380, it was conflicting with another fix (#1304).

A380 without enhancement (r2743):
A380 normal

A380 with enhancement (r2743):
A380 enhanced

@moi952
Copy link

moi952 commented Apr 7, 2025

This feature is awesome!
@cgutman , are there any plans to integrate it into the project? 😍

@fidoboy
Copy link

fidoboy commented Apr 7, 2025

Hi @fidoboy , Bug fixed, you can now download the new artifact (r2743) to try. I finally could reproduce the issue with my Intel A380, it was conflicting with another fix (#1304).

A380 without enhancement (r2743): A380 normal

A380 with enhancement (r2743): A380 enhanced

Great! I'm impatient to test it. I'll report back my findings.

@fidoboy
Copy link

fidoboy commented Apr 7, 2025

Well, I spent some time doing new tests with this feature and, in short terms, this is a placebo. There is no difference between the image quality when it's enabled or disabled. I've tried the following setups:

  • 1080 (host) -> 1080 (stream) -> 1440 (moonlight client)
  • 1440 (host) -> 1080 (stream) -> 1440 (moonlight client)

In both cases HDR was always enabled and in both cases I've compared between the video upscaler enabled and disabled. I have verified it because the text "AI Enhanced" was being displayed into the overlay stats. There was no any difference between them in the terms of image quality, the clarity, sharpness, etc. are exactly the same. And then I've tried the setup 1440 -> 1440 -> 1440 and the difference is very noticeable.

So, in short, now the text is being displayed into the overlayed info but THERE IS NO ANY CHANGE IN IMAGE QUALITY. The image is the same if the feature is activated or not. There is no difference.

@fidoboy
Copy link

fidoboy commented Apr 7, 2025

Works on macOS 15.4 with m3 cpu.

Tested with 1080p host → 1080p stream → 1080p display, at 150mbps.

It would be great to have a slider to select how much the image is sharpened, it looks over sharpened right now imo.

Default: Screenshot 2025-04-05 at 23 15 29

AI-enhanced: Screenshot 2025-04-05 at 23 15 01

The added latency might be an issue on fast-paced games.

I'm already laughing because your post is a real nonsense. What's the point to use this feature if you are streaming with the same resolution than your display? If the device where moonlight is running already uses 1080p and the host and also the stream is 1080p, where is the purppose for a video upscaler? This only have some sense if the stream is a lower resolution than the display, but it doesn't do anything if the resolution is the same.

@micdah
Copy link

micdah commented Apr 7, 2025

Well, I spent some time doing new tests with this feature and, in short terms, this is a placebo. There is no difference between the image quality when it's enabled or disabled. I've tried the following setups:

  • 1080 (host) -> 1080 (stream) -> 1440 (moonlight client)
  • 1440 (host) -> 1080 (stream) -> 1440 (moonlight client)

In both cases HDR was always enabled and in both cases I've compared between the video upscaler enabled and disabled. I have verified it because the text "AI Enhanced" was being displayed into the overlay stats. There was no any difference between them in the terms of image quality, the clarity, sharpness, etc. are exactly the same. And then I've tried the setup 1440 -> 1440 -> 1440 and the difference are very noticeable.

So, in short, now the text is being displayed into the overlayed info but THERE IS NO ANY CHANGE IN IMAGE QUALITY. The image is the same if the feature is activated or not. There is no difference.

I think it would be beneficial if you substantiated your observations with screenshots on vs off so contributors can see what exactly you see.

In the other comparison screenshots there are discernible differences. But whether you notice can be quite subjective.

@andre-ss6
Copy link

The last releases why?

Not sure if by latest release you mean the official release; If so, that won't work. This PR is still open -- it hasn't been merged to master yet.

To test this feature out before it is merged and an official release is provided, you need to either download the code and build it yourself, or grab one of the releases some folks have provided earlier.

@Psyko38
Copy link

Psyko38 commented Aug 29, 2025

The last releases why?

Not sure if by latest release you mean the official release; If so, that won't work. This PR is still open -- it hasn't been merged to master yet.

To test this feature out before it is merged and an official release is provided, you need to either download the code and build it yourself, or grab one of the releases some folks have provided earlier.

No one precompiled it, but if not, which branch is it in?

@linckosz
Copy link
Author

The last releases why?

Not sure if by latest release you mean the official release; If so, that won't work. This PR is still open -- it hasn't been merged to master yet.
To test this feature out before it is merged and an official release is provided, you need to either download the code and build it yourself, or grab one of the releases some folks have provided earlier.

No one precompiled it, but if not, which branch is it in?

The simplest way is to download an artifact, I just created one here:
https://ci.appveyor.com/api/buildjobs/1txxj1cs29b6vw7e/artifacts/MoonlightPortable-x64-r1.zip

@Psyko38
Copy link

Psyko38 commented Aug 31, 2025

The last releases why?

Not sure if by latest release you mean the official release; If so, that won't work. This PR is still open -- it hasn't been merged to master yet.
To test this feature out before it is merged and an official release is provided, you need to either download the code and build it yourself, or grab one of the releases some folks have provided earlier.

No one precompiled it, but if not, which branch is it in?

The simplest way is to download an artifact, I just created one here: https://ci.appveyor.com/api/buildjobs/1txxj1cs29b6vw7e/artifacts/MoonlightPortable-x64-r1.zip

:) My RX 560XT has access to this feature.

@ajunca
Copy link

ajunca commented Sep 4, 2025

Any possibility we will see at least NIS in Linux in shader implementation?

@linckosz
Copy link
Author

linckosz commented Sep 5, 2025

Any possibility we will see at least NIS in Linux in shader implementation?

I am currently refactoring the code using DirectX12 first, it will be a lot cleaner for maintenance, and I am expecting better performance for Low-end PCs.
So far I am able to display the stream on the screen without texture processing, currently working on upscaling steps.
Once DirectX12 is done, I shall start to see how to implement NIS in Vulkan for Linux. I wish DirectX12 version could be deployed first before I start to work on Linux.

@ajunca
Copy link

ajunca commented Sep 5, 2025

That sounds awesome, thanks!

@moi952
Copy link

moi952 commented Sep 5, 2025

Any possibility we will see at least NIS in Linux in shader implementation?

I am currently refactoring the code using DirectX12 first, it will be a lot cleaner for maintenance, and I am expecting better performance for Low-end PCs. So far I am able to display the stream on the screen without texture processing, currently working on upscaling steps. Once DirectX12 is done, I shall start to see how to implement NIS in Vulkan for Linux. I wish DirectX12 version could be deployed first before I start to work on Linux.

It's great, but unless you see any benefit in it for yourself, don't do it again because moonlight-qt is dead, the project is completely abandoned (I hope nothing serious happened to cgutman).
Furthermore, from the discussions I've had on Discord, your MR will never go through; they see no benefit in it.

I think it's great, but oh well... Thanks for this work anyway.

@cgutman
Copy link
Member

cgutman commented Sep 5, 2025

Don't worry, the project is not dead. There is a commit in this repo just 5 days ago. The main topic of discussion is how to phase these major features to avoid introducing breakage.

The current plan of record is to ship basically what's in master now and then do the SDL3 conversion and merge major feature PRs after that. This PR is touching core rendering code, so it needs to be done with extreme care and testing to avoid introducing regressions.

@moi952
Copy link

moi952 commented Sep 5, 2025

Don't worry, the project is not dead. There is a commit in this repo just 5 days ago. The main topic of discussion is how to phase these major features to avoid introducing breakage.

The current plan of record is to ship basically what's in master now and then do the SDL3 conversion and merge major feature PRs after that. This PR is touching core rendering code, so it needs to be done with extreme care and testing to avoid introducing regressions.

Sorry, I said that because no new version has been released for a year, and the original PR for this feature has been open since February 2024.

There are also some interesting PRs that haven't been looked at/reviewed.
Good thing the project isn't dead and you're doing well.

What's SDL 3 for?

@andre-ss6
Copy link

andre-ss6 commented Sep 5, 2025

Don't worry, the project is not dead. There is a commit in this repo just 5 days ago. The main topic of discussion is how to phase these major features to avoid introducing breakage.

The current plan of record is to ship basically what's in master now and then do the SDL3 conversion and merge major feature PRs after that. This PR is touching core rendering code, so it needs to be done with extreme care and testing to avoid introducing regressions.

Out of curiosity, what's the rationale behind that plan? Granted I'm neither a graphics programmer nor a contributor to this repo, but I'd guess many PRs will need potentially lots of changes after migrating to SDL3. In my experience that sounds like a recipe for killing PRs. Instead, why not merge the current major PRs and then leave a warning for the community that the SDL3 migration is underway so that they're aware that new PRs will need to take that into consideration?

@cgutman
Copy link
Member

cgutman commented Sep 6, 2025

I didn't intend to convey that we would do the SDL3 migration before merging PRs. I only meant we would do both after shipping v6.2.0. We will likely merge some PRs before SDL3 conversion for the reason you mention. However, most currently open PRs aren't touching SDL-related code that would be impacted anyway.

@linckosz
Copy link
Author

@cgutman ,
Concerning this PR, SDL3 migration shouldn't impact it, and if it does it will be an easy to fix.
For the info with the code refacto, in terms of application architecture, I will leave d3d11va files untouched as I am moving it to new files named d3d12va. As for the current DX11 version, I will just keep it as a separate branch on my repo as a "workable" archive.

@YakovAU
Copy link

YakovAU commented Sep 23, 2025

this works fantastic for me, on an RTX4090.
Moonlight_d3GTFGtIeU
upscaling from 1440p to 4k, its far less smudgey and my experience matches the OP imagery.

@brokeDude2901
Copy link

The last releases why?

Not sure if by latest release you mean the official release; If so, that won't work. This PR is still open -- it hasn't been merged to master yet.
To test this feature out before it is merged and an official release is provided, you need to either download the code and build it yourself, or grab one of the releases some folks have provided earlier.

No one precompiled it, but if not, which branch is it in?

The simplest way is to download an artifact, I just created one here: https://ci.appveyor.com/api/buildjobs/1txxj1cs29b6vw7e/artifacts/MoonlightPortable-x64-r1.zip

Doesn't seem to pick up my GTX 1650 Mobile in laptop Optimus config (10400H UHD Graphics)

@linckosz
Copy link
Author

Doesn't seem to pick up my GTX 1650 Mobile in laptop Optimus config (10400H UHD Graphics)
@brokeDude2901
VSR from Nvidia does work only on RTX, that’s why you cannot see a thing currently. During the summer, I worked on low-end and non-supported PCs in DirectX11, an improved version of this code using Shaders. I just try to find a bit a spare time these days to push it on one of my branch, you will be able to use GTX with the Nvidia shader NIS (the equivalent of FSR1 from AMD, but a bit better to my point of view). I recently acquired a GTX 1050 to run tests, and results are very positive, the additional latency is less that 1ms for 720->1440. It will work for your GTX mobile version too.
Wait for few days, and you will be able to test it. Just keep in mind that I will keep DX11 as a experimental version as the code started to be too complex due to many specifics, I am switching to a DX12 version which will be much cleaner and potentially better.

@moi952
Copy link

moi952 commented Sep 28, 2025

VSR from Nvidia does work only on RTX, that’s why you cannot see a thing currently. During the summer, I worked on low-end and non-supported PCs in DirectX11, an improved version of this code using Shaders. I just try to find a bit a spare time these days to push it on one of my branch, you will be able to use GTX with the Nvidia shader NIS (the equivalent of FSR1 from AMD, but a bit better to my point of view). I recently acquired a GTX 1050 to run tests, and results are very positive, the additional latency is less that 1ms for 720->1440. It will work for your GTX mobile version too.
Wait for few days, and you will be able to test it. Just keep in mind that I will keep DX11 as a experimental version as the code started to be too complex due to many specifics, I am switching to a DX12 version which will be much cleaner and potentially better.

Is FSR usable for all GPUs?

If so, why not let the end user choose between the different upscalers?
I guess NVIDIA and Apple are completely closed, but AMD could work everywhere?

@linckosz
Copy link
Author

linckosz commented Sep 30, 2025

VSR from Nvidia does work only on RTX, that’s why you cannot see a thing currently. During the summer, I worked on low-end and non-supported PCs in DirectX11, an improved version of this code using Shaders. I just try to find a bit a spare time these days to push it on one of my branch, you will be able to use GTX with the Nvidia shader NIS (the equivalent of FSR1 from AMD, but a bit better to my point of view). I recently acquired a GTX 1050 to run tests, and results are very positive, the additional latency is less that 1ms for 720->1440. It will work for your GTX mobile version too.
Wait for few days, and you will be able to test it. Just keep in mind that I will keep DX11 as a experimental version as the code started to be too complex due to many specifics, I am switching to a DX12 version which will be much cleaner and potentially better.

Is FSR usable for all GPUs?

If so, why not let the end user choose between the different upscalers? I guess NVIDIA and Apple are completely closed, but AMD could work everywhere?

For 2D content, only FSR1 is availble.
It is usable for all GPUs, but in 2 versions:

  • Driver version (AMD AMF): AMD's GPUs, very efficient in terms of picture quality and speed
  • Shader version: A bit blurry, the quality is clearly not the same as the driver, and Low-end PC are not fast enough to run it properly.

In the DX11 version, I will keep the dropdown menu available, so you will be able to switch from one algo to another.

@linckosz
Copy link
Author

linckosz commented Sep 30, 2025

Big Milestone!

The DirectX 11 version of Video Super Resolution is now available in a dedicated branch:
https://github.com/linckosz/moonlight-qt/tree/DX11-Upscaler

An executable file can be downloaded (until Oct 29) here:
MoonlightPortable-x64-r2.zip
If the link has expired, just let me know and I can regenerate it.

This version is not only aimed at recent GPUs that natively support the VSR method, but at all GPUs, using upscaler shaders as a fallback on Windows. Countless hours have been spent testing and fine-tuning the right settings for each GPU vendor and type. Here’s the list of GPUs I could test:

  • NVIDIA RTX 4070Ti
  • NVIDIA GTX 1050
  • AMD RX 7600
  • AMD 780M (iGPU)
  • Intel Arc A380
  • Intel UHD (iGPU)

Please note that due to the complexity of the rendering pipeline (see the picture attached) over the time in order to cover all GPU specifics, I won’t be submitting the DirectX 11 version as a production Pull Request. The code has become too difficult to maintain by anyone else. I won’t continue working on the DirectX 11 version, but feel free to fork it if you’d like. I am now focusing on a DirectX 12 version which shall be better in many aspects.

To use the feature, check the box "Video Super Resolution":
image

By default, it automatically selects the most appropriate setup based on all the tests I’ve done, but you can also force another algorithm:
image

Here is the DirectX 11 rendering pipeline for anyone who wants to understand the code structure (mainly d3d11va.cpp and d3d11_shaders.cpp):
Rendering Pipeline-DX11

@brokeDude2901
Copy link

Big Milestone!

The DirectX 11 version of Video Super Resolution is now available in a dedicated branch: https://github.com/linckosz/moonlight-qt/tree/DX11-Upscaler

An executable file can be downloaded (until Oct 29) here: MoonlightPortable-x64-r2.zip If the link has expired, just let me know and I can regenerate it.

This version is not only aimed at recent GPUs that natively support the VSR method, but at all GPUs, using upscaler shaders as a fallback on Windows. Countless hours have been spent testing and fine-tuning the right settings for each GPU vendor and type. Here’s the list of GPUs I could test:

  • NVIDIA RTX 4070Ti
  • NVIDIA GTX 1050
  • AMD RX 7600
  • AMD 780M (iGPU)
  • Intel Arc A380
  • Intel UHD (iGPU)

Please note that due to the complexity of the rendering pipeline (see the picture attached) over the time in order to cover all GPU specifics, I won’t be submitting the DirectX 11 version as a production Pull Request. The code has become too difficult to maintain by anyone else. I won’t continue working on the DirectX 11 version, but feel free to fork it if you’d like. I am now focusing on a DirectX 12 version which shall be better in many aspects.

To use the feature, check the box "Video Super Resolution": image

By default, it automatically selects the most appropriate setup based on all the tests I’ve done, but you can also force another algorithm: image

Here is the DirectX 11 rendering pipeline for anyone who wants to understand the code structure (mainly d3d11va.cpp and d3d11_shaders.cpp): Rendering Pipeline-DX11

This current build has no effect if I select HEVC 4:4:4 right ? (Which is Vulkan not DX11)

@linckosz
Copy link
Author

linckosz commented Oct 1, 2025

This current build has no effect if I select HEVC 4:4:4 right ? (Which is Vulkan not DX11)

It does support HEVC 4:4:4, it is using NIS shader.
It can depend if the GPU to encode and decode support it.
For the picture below encoding and decoding is using Intel Arc A380.

A380_YUV444_HEVC_SDR

@Psyko38
Copy link

Psyko38 commented Oct 3, 2025

Big Milestone!

The DirectX 11 version of Video Super Resolution is now available in a dedicated branch: https://github.com/linckosz/moonlight-qt/tree/DX11-Upscaler

An executable file can be downloaded (until Oct 29) here: MoonlightPortable-x64-r2.zip If the link has expired, just let me know and I can regenerate it.

This version is not only aimed at recent GPUs that natively support the VSR method, but at all GPUs, using upscaler shaders as a fallback on Windows. Countless hours have been spent testing and fine-tuning the right settings for each GPU vendor and type. Here’s the list of GPUs I could test:

  • NVIDIA RTX 4070Ti
  • NVIDIA GTX 1050
  • AMD RX 7600
  • AMD 780M (iGPU)
  • Intel Arc A380
  • Intel UHD (iGPU)

Please note that due to the complexity of the rendering pipeline (see the picture attached) over the time in order to cover all GPU specifics, I won’t be submitting the DirectX 11 version as a production Pull Request. The code has become too difficult to maintain by anyone else. I won’t continue working on the DirectX 11 version, but feel free to fork it if you’d like. I am now focusing on a DirectX 12 version which shall be better in many aspects.

To use the feature, check the box "Video Super Resolution": image

By default, it automatically selects the most appropriate setup based on all the tests I’ve done, but you can also force another algorithm: image

Here is the DirectX 11 rendering pipeline for anyone who wants to understand the code structure (mainly d3d11va.cpp and d3d11_shaders.cpp): Rendering Pipeline-DX11

Works perfectly well on an Rx 560X with NIS and FSR1.

@YakovAU
Copy link

YakovAU commented Oct 15, 2025

I have maybe an unusual use case which doesnt seem to work, i am running two instances of your moonlight portable to two different PCs, only one seems to be able to run in Super Resolution

@linckosz
Copy link
Author

I have maybe an unusual use case which doesnt seem to work, i am running two instances of your moonlight portable to two different PCs, only one seems to be able to run in Super Resolution

For each, can you describe what GPU you have, and take a screen shot of the overlay stats?

@YakovAU
Copy link

YakovAU commented Oct 16, 2025

I have maybe an unusual use case which doesnt seem to work, i am running two instances of your moonlight portable to two different PCs, only one seems to be able to run in Super Resolution

For each, can you describe what GPU you have, and take a screen shot of the overlay stats?

Oh it seems it is working according to moonlight. but the RTX icon that appears top right that usually indicates super resolution isnt there. Hmm. The hosts are a 2080TI, 3070 and the client is a 4090.

@linckosz
Copy link
Author

Oh it seems it is working according to moonlight. but the RTX icon that appears top right that usually indicates super resolution isnt there. Hmm. The hosts are a 2080TI, 3070 and the client is a 4090.

You may need to check the RTX setup in the Nvidia control panel, you have to manually turn it on and set the level. This is a limitation with DirectX11, but with DirectX12 I will be able to control it by code.

image

@YakovAU
Copy link

YakovAU commented Oct 17, 2025

It was already set to that, it seems only one instance is showing the RTX VSR icon. moonlight reports correctly on both as being 1440p stream, with RTX Super Resolution 1.5x
Edit: interestingly, as soon as i close & exit one instance, the other one gets the RTX VSR icon. Visually, i think it isnt working when both instances are running even though moonlight is reporting it is.

@linckosz
Copy link
Author

It was already set to that, it seems only one instance is showing the RTX VSR icon. moonlight reports correctly on both as being 1440p stream, with RTX Super Resolution 1.5x Edit: interestingly, as soon as i close & exit one instance, the other one gets the RTX VSR icon. Visually, i think it isnt working when both instances are running even though moonlight is reporting it is.

Oh, interesting use case, I did not get it first, you actually run 2 moonlight instances on the same PC at the same time ?
Probably rare, but I will keep it mind for my own test phase.
It is possible that Nvidia does not allow at driver level two enhanced screen at a time due to technical limitation.
What you can try is to setup one of the instance using NIS upscaler instead of Auto. You may copy the whole moonligth directory for teh second instance to not overwrite the config file inside. NIS (Compute shader) is for sure not as good as VSR (based on ML model), but still pretty descend result.

@YakovAU
Copy link

YakovAU commented Oct 17, 2025

It was already set to that, it seems only one instance is showing the RTX VSR icon. moonlight reports correctly on both as being 1440p stream, with RTX Super Resolution 1.5x Edit: interestingly, as soon as i close & exit one instance, the other one gets the RTX VSR icon. Visually, i think it isnt working when both instances are running even though moonlight is reporting it is.

Oh, interesting use case, I did not get it first, you actually run 2 moonlight instances on the same PC at the same time ? Probably rare, but I will keep it mind for my own test phase. It is possible that Nvidia does not allow at driver level two enhanced screen at a time due to technical limitation. What you can try is to setup one of the instance using NIS upscaler instead of Auto. You may copy the whole moonligth directory for teh second instance to not overwrite the config file inside. NIS (Compute shader) is for sure not as good as VSR (based on ML model), but still pretty descend result.

Yep haha. i multi box in a certain game but dont have the space for extra monitors so i just tab between them with moonlight. I'll give that a shot cheers.

@cgutman cgutman added this to the v7.0 milestone Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.