DLSS Unity integration

I am trying to integrate DLSS into Unity URP, based on GitHub - NVIDIA/DLSS: NVIDIA DLSS is a new and improved deep learning neural network that boosts frame rates and generates beautiful, sharp images for your games . I do have a native plugin and the C# bindings working, I can create and evaluate a feature from a render feature. NGX_D3D11_EVALUATE_DLSS_EXT is called from the rendergraph callback and completes with “Success”.

The problem is, nothing seems to happen! RenderDoc shows that the DLSSPass is executed, but the only two commands are “Discard View(CubeInputSurfaceCachedUAV)” and “ClearView(0,0,0,0)” on the texture I want to write the result into.

I am generating log files, they don’t print any warnings or errors. Are there any more diagnostics I can enable? The NVidia internals are a black box, and right now I have no idea what else I can do.

NVSDK_NGX_D3D11_GetCapabilityParameters returns that DLSS should be supported.

(I tried to integrate Streamline Streamline | NVIDIA Developer , but that seems to conflict with Unity internals. Unfortunately we can’t update to a newer Unity version.)

Small update, I added debug events around the evaluation, which shows that draw commands are coming from the feature, not from Unity:

ID3DUserDefinedAnnotation * pPerf;
HRESULT hr = deviceContext->QueryInterface(__uuidof(pPerf), reinterpret_cast<void**>(&pPerf));
pPerf->BeginEvent(L"NGX_D3D11_EVALUATE_DLSS_EXT");

NVSDK_NGX_Result result = NGX_D3D11_EVALUATE_DLSS_EXT(deviceContext, gHandle, Params, &evalParams);
if (!NVSDK_NGX_SUCCEED(result))
{
    LogError(result);
}

pPerf->EndEvent();

The event shows up in renderdoc, so this code is definitely reached and executed.

Edit: I am now wondering if it goes through some private API that is not recorded by RenderDoc… That would explain it, but not help with the integration.

I am going to resolve this myself now:

Apparently the DLSS DLL uses some private API that is not captured by RenderDoc. It works, and if you use the development DLL you will see the overlay, but generally from RenderDoc’s position the output texture is not touched, making everything after the DLSS pass harder to debug.

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