DLSS Motion Vector Question

Hi, I am trying to implement DLSS in a mod for Q2RTX I have been working on. For some reason I can’t get my motion vectors to work. I am rendering the motion vectors to VkImage that is the same size of the render resolution. When I look at the motion vector debug window it looks like the motion vectors approximately half size. If I tweak the NVSDK_NGX_Dimensions input of the motion vectors I can make it look correct in the debug window but I can tell the motion vectors are only effecting the small area in the top left of the screen. I used the Vulkan Configurator to debug and make sure the extents on my motion vector VkImage were correct. I was wondering if anyone might know what I am doing wrong.

I was able to figure it out. I figured I would post the solution here incase anyone else had the same problem. I wasn’t setting the low resolution motion vector parameter correctly.

Hi there @mstewart248 and welcome to the NVIDIA developer forums!

Great that you could figure it out and that you shared your solution!

I am curious, do you already have something to share? If so please feel free to link it here.

And if not, would it be too much to ask to remember our forums or our Discord and share your work whenever it is far enough along?

Thanks!

My project as at GitHub - mstewart248/Q2RTX-MOD: Quake2 RTX. When Q2RTX was released I was started poking around with it because I was fascinated with the new ray tracing technology and it was all released open source. I made a couple tweaks here and there changing the colors of some effects and seeing how many polygons and particles I could throw at the renderer. I didn’t touch the project for a couple years then the Quake 2 remaster released. I was disappointed there wasn’t an RTX version of the remaster. I decided to try to load up the new Machine Games level in Q2RTX to see if I could get them to load. Nothing loaded at first but with a little tweaking I got the levels to load. I had to make some gameplay fixes and bring over some new code the game86x.dll. I noticed the new levels were using a lot more light sources than the base game and not all the lights were loading up. I upped the cap on light lists to make all the lights render. I noticed in certain situations of flickering low light the light can become super noisy. Right afterward Nvidia announced ray reconstruction for DLSS and thought something like that could be really helpful for this situation. I downloaded the DLSS SDK and read the documentation and looked at what Sultim did for his path traced Quake/Half-life engine and figured out the DLSS super resolution implementation for Q2RTX. I figured if I could get base integration working it wouldn’t be too much more work when/if they update the SDK for ray-reconstruction.

I actually do web development professionally and really didn’t know a lot about modern 3d APIs like Vulkan. So it was a really good learning experience. Now I know enough about how the ray tracing shaders work I can get new outputs from the shaders that didn’t exist before. So now I am working on how to get all the new g-buffer parameters as output to give the DLSS model to for ray-reconstruction once that is available.

I think the DLSS implementation looks great and 90% of the time is superior to native resolution. The only problem is there can be noise in certain lighting conditions that look a lot better with native resolution + TAA.

1 Like

Last night I finally figured out how to get ray-reconstruction working. There are a couple issues with animated transparency like water that I need to figure out.

Ray-Reconstruction + ReStir

Ray-Reconstruction

DLSS no Ray-Reconstruction with ReStir

DLSS no RR without ReStir

No DLSS with ReStir

No DLSS no ReStir

Great progress and thanks for sharing!

One question though, Ray Reconstruction was not publicly released yet, how do you test it?

I was able to edit the SDK header files to get it to work. I was able to find the missing parameters by opening up the dlssd DLL file in a hex editor. I was explaining to another dev that used my DLSS implementation to do their own how to do it in this reddit thread.

https://www.reddit.com/r/quake/comments/16fg1by/comment/k4k445b/?context=3

I think I need to add some more inputs to make the transparency work correctly but so far it has completely fixed my firefly problem and everything else looks very smooth and stable.

This topic was automatically closed after 2 days. New replies are no longer allowed.