I installed the Nvidia DLSS Plugin to implement it in a game I am working on. It is working in the editor, but I noticed that some console commands are not working anymore even if I turn DLSS off. For example r.ScreenPercentage=25 has absolutely no effect. Also trying to set the DLSS-Mode via Console Command in the Cmd is not working at all. For example r.NGX.DLSS.Quality=-2 has absolutely no effect. But I can set it via the DLSS Settings Menu. The performance in the editor is as expected, with DLSS Quality I win performance against DLSS off and DLSS Ultra Performance is saving the most performance.
But it gets very strange if I try to activate it in the game via blueprints. It seems like I can enable or disable it via r.NGX.DLSS.Enable=x because if I disable it, my r.ScreenPercentage is working again.
But it seems not to work changing the mode via console commands in Blueprints. If I try it with the DLSS Node and set DLSS to Quality, I am even LOSING 50% performance against native. I have to set it to ,performance" to reach the same performance like Native+TAA does give me. The picture quality also seems not to be affected much in the game.
I am doing many things with console commands in my main menu. Is it possible, that something interferes with DLSS? At the moment I simply cannot use it for these reasons in my game, very sad.
- I am losing 50% performance in game with DLSS Quality. WTF?
- In the editor I am winning 50% just how it should be.
- Some console commands seem to be bricked.
TAAU runs faster than, and in my opinion looks better than DLSS (Except on ultra low res, like ultra performance or 480p and below), Would reccomend making both an option. Also, DLSS quality IS the screenpercentage for some stupid reason.
Can you confirm the packaged game is running in DX12? If not, by default it will run in DX11 and Raytracing and therefore DLSS will be disabled, which could explain the performance loss.
In the editor I tested TAAU and DLSS very extensive and in my project I came to the conclusion that DLSS performs absolutely the same as TAAU with the same internal resolution but TAAU looks very slightly worse. - That was exactly my plan. I wanted to make DLSS and TAAU both an option. Because I (1) find it interesting to compare them and (2) TAAU is not working on non Nvidia GPUs. What do you mean by DLSS Quality IS the screenpercentage?
Yes I can confirm it is running with DX12 because I am using Ray-Tracing very extensively, the game would look totally different without it. (But it now has also a fallback mode with Planar and Screen-Space reflections.)
I now tried to delete my complete main menu settings logic, but the problem persists.
I also tried to delete all the actors one after another, but the problem seem to persist even if I delete nearly everything.
If I create a new level in my project there the problem is not present, DLSS performs as expected.
Therefore, if I should create another game someday, I will have the DLSS performance always in mind from the beginning and check it. But what could be the problem with the level? Normally I would simply think that my Ray-Tracing-Effects are that expensive that DLSS reached completely it’s limits and simply falls below native performance. But it performs right in the editor… so… I even tried it with the same resolution as my editor window has.
I don’t think any actor would be the cause, but in fact it is very strange all looks OK at the editor and not when packaged. Do you mind on providing a small project with the minimum amount of stuff which has the issue? Please, just don’t put any confidential stuff in it, since the forum is quite open and if you wish you can send via private msg a download link, but the more people could put their hands on a sample, better the odds of someone finding the culprit.
Very interestingly I was able to dissect a part that has not much to do with my game that has the problem and package it.
It is a “dirty development” build.
Press Enter to activate DLSS Quality and Space to disable DLSS. In my case DLSS Quality performs worse maybe you have to make the window big enough, so the load is high enough. Sorry for the typo in the Print String, but I think the essence is clear.
Here you can download it.
This is the Level Blueprint, that is all the scripting the project contains:
In the Beginning I have around 75ish FPS, if I activate DLSS Quality it is about 65 and with DLSS off it is around 120FPS. In the beginning it seems to be the DLSS-Performance-Mode.
Additionally I would advise Nvidia to turn DLSS off by default, please.
You shouldn’t have anything activated you didn’t activate by yourself…
OK going to take a look at it 1st thing in the morning. Cheers.
You are very likely wrong because you did not know how dlss works, primarily because of how its explained, or lack thereof. DLSS quality has nothing to do with the algorithm, but rather it simply lowers the rendering resolution that it upscales, which is a stupid, easily confusing “feature”, you can see the actual screenpercentage by clicking this little arrow (unless it was removed)
TAAU runs consistently better than DLSS by a ms or 2, which is a pretty big gap, atleast from my tests, and TAAU looks worse because its not even on the same resolution, and fills a different role (kinda).
DLSS and TAAU look better based on what they are used on.
TAAU does wonders for stylized stuff, but falls apart completely when high detail or sub-50% res is used, its better for light upscaling like 75%, with pretty much 0 visual loss.
DLSS looks amazing in high detail environments, but in simple/stylized ones in motion, well, it does not take the camera’s motion into consideration, especially on screenspace effects, and it does NOT look good. DLSS is pointless for light upscaling due to a very high upfront cost and extreme motion artifacting at higher resolution, But at lower res… Thats when DLSS shines. It can make 720p look like 4k, atleast with detailed terrain or low light to cover up artifacting.
Note, DLSS doesnt work on non nvidia cards, not TAAU, and TAAU with gen5 TAA is WAYYY better (No more flicker! But bugs out horribly below 50%).
I would dare to say I know pretty good what DLSS does. I know DLSS is temporal upscaling and therefore I expect a performance boost against native what is the case in the editor and not in my game.
Depends on what you mean with stylized. It probably has problems with things like cell shading, post processing and reflections because the motion vectors are mostly useless on the last one. Cell Shading is simply something DLSS was not made for and the post processing therefore should applied after the DLSS pass.
Well, duh, yes its temporal+AI upscaling, but I was talking about what the quality levels meant. Though, it actually losing frames, yeah dlss is slow af compared to other methods, but not THAT slow. That seems like a bug that needs to get squashed ASAP.
And by stylized in this example, i mean theres nothing for artifacts to hide against, like rocks/black areas, so they stick out very severely.
Yes, as far as I know version 1.0 was AI-Upscaling then around version 1.9 they went to a temporal method that did not use the tensor cores and with 2.0 they used them again not exactly to upscale but more to clean up the samples collected over multiple frames for the final image.
Quality has an internal scaling factor of ~0.67, Balanced 0.58, Performance 0.5 and Ultra Performance 0.33.
I guess they plan a Ultra Quality Mode with a factor of 1.0.
For some reason they dropped the supersampling part of deep learning supersampling, but would be very nice to have it. Maybe integrate it into youtube or something? Deep learning video upscaling? Probably too much, but cant hurt to ask.
Yes I totally think this is the future and will replace classical upscaling for video like lanczos or bicubic what is used now everywhere. I guess in 5 years web browsers will do it by default. DLSS wouldn’t work on video because there you cannot jitter the sample coordinates and have no motion vectors. It does only work with locally generated CG graphics. But you could at least use an improved DLSS 1.0 approach on it. I guess the Nvidia-Shield is doing something like this on video what seems to work great.
Obviously there are limitations to doing it on video, possibly working off the raw video data to atleast try to get something motion vector-ish, or just straight up dlss 1.0 enhanced would likely do wonders compared to the current solution, being bilinear (which looks like poo)
Uhh, it’s the middle of the night here and now I had the final idea what’s happening. I have a post process volume with a Screen Percentage of 50% and DLSS other than TAAU is overwriting it. That is the freakin’ final answer…
I am Mathias and work on the DLSS plugin for NVIDIA. Just wanted to let you know that we saw your issue and are taking a look internally.
Btw, thanks for making the repro build. I just did take a quick look and I can reproduce "interesting " behavior similar to what you describe.
I’ll take a deeper look next week, when I’ll be back from my vacation.
The r.ScreenPercentage cvar is only used for TAA and TAAU, not DLSS. In game mode or PIE DLSS determines the effective “screen percentage” indirectly by the r.NGX.DLSS.Quality cvar.
See the logic in FDLSSUpscaler::SetupMainGameViewFamily (/DLSS/Private/DLSSUpscaler.cpp)
In the level editor viewports, the DLSS mode is determined by the DLSS Settings menu and the r.NGX.DLSS.Quality cvar is not used outside of game mode.
The reason for this is that each level editor view can have a different DLSS mode, but there is only one r.NGX.DLSS.Quality cvar.
See the logic in FDLSSUpscalerEditor::SetupEditorViewFamily (DLSSEditor/Private/DLSSUpscalerEditor.cpp)
Additionally I would advise Nvidia to turn DLSS off by default, please. You shouldn’t have anything activated you didn’t activate by yourself…
Noted. For the editor views, DLSS is off by default. However for game mode we found that we got quite a few developer questions during early acceess along the lines of “I enable the DLSS plugin. Why is there no DLSS happening”. Enabling DLSS by default when the plugin is enabled reduced that confusion.
You could set r.NGX.DLSS.Enable to 0 in your DefaultEngine.ini and then call UDLSSLibrary::SetDLSSMode as needed at runtime.
Yeah, DLSS views (like some other parts of the engine) does not support having post processing volumes overwrite the screen percentage. I’m sorry that this wasn’t made more obvious in the documentation and the plugin.
I’ll see whether I can either add support for that, or at least show an obvious warning when post processing volumes are overwrititing the screen percentage when DLSS is active.
Yes, that would be a nice idea in development builds.
That was exactly why I thought you activated it by default. I worked some time in the IT support and these were exactly the kind of questions I was getting.
So am i missing something here? I have the latest driver and DLSS enabled in UE4 and i can select it in the editor menu but it seems to do nothing. I mean it doesn’t affect FPS at all , no matter what setting i am clicking on . Does this only work in full screen? Or will it work in minimized PIE as well? Is there something else i need to enable? Or does this only work with resolutions above 1980 X 1080p? When i click on the different settings in the editor menu , it seems like it is clicking the button but there seems to be no indication of what setting i am using at any given time , other than clicking on it.
No, it should work in all resolutions.
What Graphics Card do you have?