Unity custom SRP DLSSv3 issues

Hello there,

I’m trying to add DLSSv3 to our Unity 2022.3 custom SRP based game, but the produced image is surprisingly blurry (sharpness not working?), we can’t upscale more than 2x (base res. scaling + Dynamic Resolution Scaling can make input image smaller than half of the native output) and there are some image stability issues.
I’m showing it here:

Details about DLSS integration are here:

Best Regards,
Tomas

Hello @WoodyPWX,

which SDK are you using? Because there is no Unity plugin for DLSS anymore, Unity comes with DLSS integrated. Is it possible that it overrides the library path regarding the nvngx DLLs? The version of nvngx_dlss.dll in C:\Program Files\Unity\Hub\Editor\2022.3.26f1\Editor is 3.1.10.

If you download the DLSS Super Resolution SDK from the web page it includes the Programming Guide which has a very extensive section on Troubleshooting for example issues like blurriness. But the Jitter chapter also has some troubleshooting, as does the Exposure section.
This doc also contains details on the DLSS presets which describe the different scaling factors. The highest such factor is 3 for “Ultra Performance”. You should check if the scaling factor you try to support corresponds to the range of those presets.

In general DLSS includes a certain amount of sharpening, but if that is not enough, you should look at the the NIS SDK regarding image scaling.

I try to get some Unity experts to check this, but it might take some time.

Hey @MarkusHoHo ,
Unity source has NVUnityPlugin.dll in its source code, as well as nvngx_dlss.dll (both in \External\NVUnityPlugin\Build.7z, decompressed and used). Build system then distributes these to Editor and Windows Player builds. I’m pretty sure the nvngx_dlss.dll is the one used in editor testing, because if I delete it, DLSS stops working next editor start. If I replace it by dev. version, I can see the debug overlay I was showing and it says 3.7.0
I replaced the original nvngx_dlss.dll by newer version from GitHub
I was verifying in the debug overlay that our input is correct, but it never shows anything about sharpness. Is there a way I can validate sharpness using debug DLSS overlay?
Re scaling, I will prepare some presets of DLSS quality and resolution scaling to prevent problems.
I will ask Unity if we can have NVUnityPlugin.dll source, allowing us verify communication with nvngx_dlss.dll related to sharpness

The GraphicsDeviceDebugView.ngxVersion, I’m getting from NVUnityPlugin.dll, has value 0x0003010a and I think I found it using a hex editor in the .dll itself. It doesn’t appear to be fetched from the nvngx_dlss.dll That would explain why DLSSv3 rev. can be newer but the ngxVersion remains the same:

Hey @MarkusHoHo ,

We have source code of the NVUnityPlugin now and the version was indeed baked into the NVUnityPlugin.dll to speed up API query. I was able to rebuild it with latest DLSS dll and also improve our DLSS integration. Optimal settings is now requested and used for output resolution and selected quality. DLSS is also triggered before post processing as required in the documentation. Yet we are seeing some issues (visible patterns appearing and dissappearing over time):
image

I’m showing it also in this video:

Is this a known issue? If yes, could it be prevented?

Best Regards,
Tomas

It all fixed after I’ve done a couple of changes:

  • MVLowRes flag added (our MVs are in rendering res.)

  • Fixed scaling size and sign of motion vectors passed through execution data .InMVScaleX/Y
    image

  • Fixed scaling of jitter, passed through execution data .InJitterOffsetX/Y
    image
    It’s not clear to me why it’s not just jitter.x/.y I use in the projection matrix, but it was the only way to get a nice jitter spread in the debug viz:
    image

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.