Hello everyone! For a while now I’ve been working on a retroreflection shader model for Unreal Engine 4, and with the recent release of Unreal Engine 5, I decided to port it.
I recently uploaded my work to github here: GitHub - RDTG/UnrealEngineRetroreflections: Retroreflection Shaders for Unreal Engine 4 and 5
There are two variations of this shader for 4.26 and 5.0.0, the first one is a drop in replacement of ShadingModels.ush that works on any binary/source build of the engine. This version comes with a caveat however, as it replaces the clear coat shading model, so if you use this, no more clear coat.
The second, and extremely WIP version is the custom shading model version, this one you can apply the git patch file to Unreal Engine 4.26 source or Unreal Engine 5.0.0preview 1 source, it adds a new “Retro-reflective” shading model you can set in your materials.
The shading model version also adds 2 other shading models I used for testing purposes, these can be repurposed to whatever or ignored for the time being. Do note I probably won’t be updating the shading model version for very long as I’m trying to get this working in plugin form, but I will maintain the drop in shader replacement version.
The shader relies on the 2 custom inputs that you can use to mask your retroreflections or control their return color intensity.
If you are using the drop in version, the material output nodes Clear Coat & Clear Coat Roughness are used here. Clear Coat is used for the mask, and Clear Coat Roughness is the return color control.
If you are using the custom shading model version, the nodes are named Retroreflective Mask & Retroreflection Depth doing the same thing as noted above.
Please report and crashes or issues you have here and I will get to fixing them as soon as possible.