Generating Ray-Traced Caustic Effects in Unreal Engine 4, Part 2

Originally published at:

In the first post on ray-traced caustic effects, we introduced mesh caustics and its usages in Unreal Engine 4. In this second post, we describe water caustics. The beta version of the source code and sample assets have been released in the UE4 NVRTX_Caustics repository. For more information, see the Release Information section at the…

Is there a sample map available with an example of the water caustics?

Hello, here’s the sample map of the swimming pool mentioned in the blog : WaterCausticsDemo_4.25 - Google Drive .

Hi! The caustics effects (especially the Mesh caustics) are fantastic, do you have any timeframe on when we could have a 4.26 update on those? I tried to make a rework of the engine code myself to combine 4.26+dlss and caustics-4.25.3 but so much seems to have changed that had to quit after a few days of struggle. Thanks already!

Hi, we are working on the 4.26.1 update and try to complete the update in a few weeks.

1 Like

Thanks for posting the link to the demo project! When I tried to open it, I got an error saying "This project requires the “GraphicsCardInfo” plugin. I synced the branch named “NvRTX_Caustics” from your git repository and built that, is that the correct branch?

This is excellent news, thank you already!

Sorry for the delay, NvRTX_Caustics is the correct branch so far, we are going to upload a new branch soon. We will check the code and give you feedback ASAP


Hi, here’s the caustics branch based on 4.26.1,, please have a try.

1 Like

Please try the new caustics branch based on 4.26.1,, the issue should be solved.


Thank you so much, compiled already and got my test scene working! This is exciting, currently trying to understand the DiaphragmDOF shadermagic a bit better to push the prism effects even further.

Can’t wait to see 4.26.2 rolling out :D because of metahuman :D
and I really should say your work is masterpiece … keep it going guys

Thank you! We are upgrading it to 4.26.2 and will release it ASAP :)

1 Like

Hello and thank you for sharing this very exciting work!

I’ve read everything I could find, but have been struggling for a week to build this. All of the commands under Building and running end with similar errors. I documented build errors from 4.25 here. Also with both windows and linux I’m receiving this make error when building the NvRTX_Caustics-4.26 branch. Windows VS showed 5 build errors in total. Searching the forums I don’t see anyone else with this issue, and this isn’t my first rodeo. I’ve built many branches of UE, and other programs all the way down to custom Linux kernels for diskless nodes that boot from NFS drives.

What could be the fix?

[2/613] Compile Module.Engine.35_of_48.cpp
In file included from /mnt/2.26/Engine/Intermediate/Build/Linux/B4D820EA/UE4Editor/Development/Engine/Module.Engine.11_of_48.cpp:11:
/mnt/2.26/Engine/Source/Runtime/Engine/Private/Components/LightComponent.cpp:321:4: error: field ‘bTiledDeferredLightingSupported’ will be initialized after field ‘bAffectWaterCaustics’ [-Werror,-Wreorder-ctor]
, bTiledDeferredLightingSupported(false)

Ubunbtu Linux Kernel 5.4.0-66-generic
NVIDIA Driver Version: 460.73.01
CUDA Version: 11.2, and an RTX 3090

Thanks for any insight :)

Hello, sorry for the delay. I think you get this error because you are turning on the “Treat warnings as errors” option in your compiler. To fix this issue, you could turn off the “Treat warnings as errors” option or relocate the variable initializing position in the code. Could you move the WaterCausticsPrecision, NumWaterCausticsMapCascades & WaterCausticsMapCascadeScale ahead of the IESTexture and move the bAffectWaterCaustics ahead of bCastModulatedShadows ? This should fix the compiling warnings. And we will submit a change to our branch to fix it later, thank you for pointing out this problem !

Here comes the NVRTX 4.26.2 and now I’m assuming an update for this branch will come soon. so excited :D

Hi there again:D
Sorry for asking too much but I just wanted to know what your plan is for uneral engine support?
do you guys have any plan for UE5 or not? cause I’m just thinking about Lumen with caustics and its blowing my mind.
please inform me if it is going to be in your plan or not thanks a lot

Currently we don’t have a clear plan for UE5. But I think we will continue our support for caustics.

1 Like

That is the most relaxing “not so clear plan” I’ve ever heard :D
thanks a lot and I hope you guys the best for letting the magic continue its wizardry.

Huge thanks to developers at Nvidia, this ray trace looks really nice, hope UE5 will keep ray trace as an option, if not, just keep using UE4 is still not a bad choose.