Writing to Velocity Buffer

Hi I’m working on rendering plugin for UE.

I do render using GetRendererModule().RegisterPostOpaqueRenderDelegate

I write to bound color buffer and depth buffer. However motion blur and temporal AA are distorting what I have rendered.

I have read through the shaders and source code and I can see that it happens because there is different value for different depth in velocity. That makes sense that my shader does not write to it.

I dont know any reasonable solution right now, Im not that experienced with UE. I have couple ideas/questions

  1. Can I bind velocity render target in C++ so I can render to it in my native code in the plugin Im writing?
  2. Can I write post processing shader that writes to velocity?
  3. Anything else?

This is the video of the problem:

[video]UE4Editor 2017 07 11 14 47 26 58 - YouTube