Basically what you are wanting to do is “Scatter” a value from A to B, where B is some location other than the current pixel. GPUs are notoriously terrible at that and there is really no way to do it in UE4 that I am aware of.
The alternate technique is ‘gather’ which means that you are still in effect doing A to B, but you achieve it by starting at B and instead backtracking to A and using the information “gathered” at that point to decide what to actually do with B. This is why things like screen space reflections require multiple steps, they need to ‘search’ for the correct intersection with linear search.
So you need to write a basic tracer of some kind that can find the A point, whatever that may be in your case. If you know the exact distance and location you are looking for, you simply offset to that position as your starting position before, and you apply the inverse to backtrack for the gather. Its much easier than it sounds.
To do a scatter approach I believe you will need to set up a custom buffer in c++ for now.
For what its worth, even when writing gather operations, I often find it useful to flip the logic in my head and think of it like a scatter operation. All you really have to do is flip the signs (ie positive offset becomes negative) and the two can be inverted so that you don’t have to think in the backwards space.
This also kind of relates to simulations like advection where you typically backtrack to advect rather than go forward in time.