Implementing the filter:
Implementing this filter requires quite a lot of heavy math, so luckily for me I found a video by Acerola where he documented the process as well as linked an implementation in Unity. To make this shader in Unreal I had to translate the Unity shader to the Unreal material graph and because of the repeated texture sampling as well as math I make the shader inside custom nodes, which meant writing the code in hlsl.
Using render targets:
Since the shader was divided into 2 main parts, the Eigenvector calculation and the Kuwahara filter, which both needed to sample neighboring pixels to get their value, I had to optimize by dividing the shader into 2 passes. The initial plan for this was to use multiple post processing materials, but since the Kuwahara filter required 2 textures, the scene texture and the eigenvector texture, I had to use a render target to get them both into the shader.