NVidia gameworks

Hey,

Do you have any plans to add support for NVidia Gameworks stuff (such as the NRD denoiser) at some point? So far it seems to be easily the best denoising solution I’ve seen for raytracers. Also their gazillion light importance sampler (RTXDI) seems very interesting.

I tried integrating NRD myself, but hit a brickwall because their integration seems to need access to the physical adapter info (IDXGIAdapter), which I could not resolve from Unity’s low level gfx interfaces?

//
nri:: DeviceCreationD3D12Desc deviceDesc = {};

//
deviceDesc.d3d12Device = s_unityD3D12->GetDevice();
deviceDesc.d3d12PhysicalAdapter = ??? <— this is the problem;
deviceDesc.d3d12GraphicsQueue = s_unityD3D12->GetCommandQueue();
deviceDesc.enableNRIValidation = false;

// Wrap the device
nri::Result result = nri::CreateDeviceFromD3D12Device(deviceDesc, nriDevice);

br,
Sami

1 Like

The problem is d3d12Device you most specify IDXGIAdapter explicitly so you cant get IDXGIAdapter from d3d12Device.
But still maybe you can create new Adapter(IDXGIAdapter) which is the same one used with d3d12Device.Most device will have more than adapter or have different version. More likely this will not will work at all.

ComPtr factory;
ThrowIfFailed(CreateDXGIFactory1(IID_PPV_ARGS(&factory)));
ComPtr hardwareAdapter;
GetHardwareAdapter(factory.Get(), &hardwareAdapter);

Do you succeed to integrate NRD into Unity by native render plugin? I’m also working on a Unity NRD implementation and found that it’s a bit difficult to do it in c++ cause it takes more time to iterate and is harder to debug.

Hi,

I gave up, got so many other things to do. It should be doable, though, as far as I understand.

br,
Sami