Trying to bring RTXGI to 5.7

Given that Arc Raiders apparently uses RTXGI, I started with the noble intention of bringing RTXGI to Unreal Engine 5.7 and sharing it with the community.

Unfortunately, I ran into a major roadblock: enabling ray tracing in the latest version of UE5 requires SM6. To make the plugin compatible with SM6, I tried to copy as much as I could from Lumen. The plugin now runs, but the shaders are outdated and likely need to be rewritten to match the ray tracing shader model.

I don’t have much experience with shaders, so if anyone else is interested in this effort, feel free to try updating them. I made a few attempts to follow Lumen’s shader patterns, but without success, and I haven’t pushed those changes.

The repo wasn’t intended to be shared in this broken state, but I’m not making any progress so apologies for that.

3 Likes

RTXGI is no longer the latest version that matches, RTXDI yes New,you should refer to the NVRTX 5.6 branch,https://developer.nvidia.com/game-engines/unreal-engine/rtx-branch,https://github.com/NvRTX/UnrealEngine/tree/NvRTX_Caustics-5.6.

great work man. maybe you should create some issues on github on your repo so people wanting to contribute can know where to start. as detailed as possible would be ideal.

I’ll do it later, thanks for the tip. I wanted to release a base version that at least replicates the previous behavior, since I believe there’s room to optimize by reducing the number of permutations.

Basically, the volume is spawnable and the probes are visible, but the engine keeps logging a mismatch between the expected shader and the actual one. The shader has a hash of 0 and isn’t properly initialized.

The log says:

[205]LogD3D12RHI: Warning: Raytracing shader with entry point ProbeUpdateRGS, name , and ShaderBindingLayout hash 0 doesn’t match the RTPSO ShaderBindingLayout hash 3892743247.

Despite this, I think it’s close to working, the engine and the map start up properly.

1 Like

Lumen GI and Reflections feedback thread - #2387 by WayAway - there is a mention of official implementation of something similar in UE 5.8.

1 Like

I have been looking into doing the same thing. I’m wondering where you got the source from, if it was from the ProjectBorealis Github then I’m not sure the plugin is actually functional. Check out these 2 issues from that Github:

The official Nvidia Github only has the UE4 version of the plugin, but the final UE5.0 version of the plugin including source and binaries can still be downloaded on the web archive here:

https://web.archive.org/web/20240601123846/https://developer.download.nvidia.com/rtx/rtxgi/RTXGI_UE5_Binary_Plugin_v1.1.50.zip

I took it from there and modified the incompatible parts of the code, as I mentioned earlier. The plugin is running, but the shaders still need to be updated.

NvRTX/UnrealEngine at nvrtx-5.7 Branch is presently in Preview

Hello, did you by any chance manage to get around this ShaderBindingLayout hash 0? I am trying to setup a raytracing shader but I am faced with this issue too. Also about RTXGI even you manage to fix it and compile it for UE5.7 you will have blocky artifacts, I have tried a while ago to do it for UE 5.6 and SM6, while I managed to compile it successfully I got blocky artifacts

EDIT:

You have to add this to your shader class to fix hash 0 issue

static const FShaderBindingLayout* GetShaderBindingLayout(const FShaderPermutationParameters& Parameters)
{
	return RayTracing::GetShaderBindingLayout(Parameters.Platform);
}

I opened a pull request which gets the plugin working on 5.7.2

2 Likes

Hey there.

Great initiative!

I have opened a PR that fixes a fatal assert when changing the probe count / density on a DDGI Volume.

I have also opened an issue regarding the Static DDGI method not working; it would be great if we could get that working, as its more performant and desirable than dynamic GI on certain platforms (medium to low-end GPUs, Steam Deck etc.)

@ace360 Could you share your 5.6 version of this please?

Sorry for the late reply, but it should be in this branch https://github.com/Arajinzz/UnrealEngine/tree/expiremental-5.6.1
This is an engine level plugin, also another piece of information that might be useful is I tried to also make some kind of a custom SSGI implementation with raytracing but I had also those blocky artifacts for some reason. Which made me think that it could be that the same thing missing from the RTXGI implementation is also missing from my implementation.
My Custom SSGI:

I will try to link an Image for RTXGI in 5.6, If I have time to compile the 5.6 engine.

@ace360

I managed to get a 5.6 of RTXGI working using the repo shared by @Blue_man as a base.

I think I’ve noticed the same kind of artefacts you mention, but I’m not sure what is causing them exactly. In fact, sometimes, the artefacts don’t show up at all, whilst other times they do.

1 Like

This is another branch, Where I was trying to understand what is happening by doing something simple https://github.com/Arajinzz/UnrealEngine/tree/playground-5.7.2

But as you can see I have seen the same artifacts, it is not clear why. I tried playing with the noise generation but didn’t work. Maybe it is the Hit shader that is doing something weird, since both RTXGI and my custom GI are using the same default Hit and Miss shaders.

Ill take a look later this week @ace360

I really hope you guys are still working on this plugin! RTXGI is a necessary alternative to Lumen for many of us

Another fork fixed the static runtime / baked functionality GitHub - kpitikaris/RTXGI-UE-5.7-Plugin: Porting RTXGI to 5.7 and SM6

2 Likes

My issue here was rays were self-intersecting, I fixed the issue by playing with TMin and adding a weighted bias to the RayOrigin along the normal. I tried to do the same with RTXGI but no luck. at this point I think It is easier to just understand the DDGI paper and implement this from scratch.

1 Like