I am new to UE4 and I am working on a project that is tring to use a depth camera into Unreal engine 4.10. Now I need to filter a raw depth image using bilateral filtering on GPU. The first thing came to my mind is the material blueprint script. Since bilateral filtering requires two passes and I hope this can be done in one frame. In directx11, I can submit two draw calls to GPU to get this done. But in the unreal, I cannot find a way to accomplish this purpose in one frame. I can use the dynamic material of Unreal, but it requires two frames to finish the bilateral filtering. So basically, I need to get the rendertarget of the first pass in the material blueprint script and then use this as the source for the next pass, and finally, bind the result to a material and apply this material to a mesh.
If anyone can give me some clues or provide any related tutorials or comments, I will appreciate that.