- Home /
Passing Per Object Motion vector data between two cameras
I have two camera setup of which first draws most of the scene and latter is used on drawing water. I draw second camera without any clear flags, taking advantage of first cameras depth buffer and such. However, it seems that motion vector information is camera specific (also with per object motion vectors) which causes issues when using TAA post processing as I have lost the per object motion.
As the camera transforms are totally synced between cameras, I might be able to reach wanted accuracy by just using first camera's motion vector buffer for second camera's post processing effects. Is there some straight forward way on forcing second camera to use first camera's motion vectors or any other good suggestions on how this could be solved?
Answer by hepphep · Oct 09, 2017 at 01:11 PM
Did not find straight forward way, but got it working.
In practice, I made post processing effect with shader that did not modify anything but instead blitted motion vector data into RenderTexture. Then made a modified version of post processing stack's TAA, which took advantage of the motion vectors in that RenderTexture instead of camera's own motion vectors, and used that TAA for my second camera.
Bit hacky and will need modification for other post processing effects taking advantage of motion vectors as well, but seems to work nicely.
Your answer
Follow this Question
Related Questions
How to limit the post processing effect only to the base camera 0 Answers
Help I cant use multiple cameras with layers. [Solved] 1 Answer
Using Multiple Volumes with 2 Cameras 0 Answers
Multiple post processing profiles? 2 Answers
How to make the camera image rendered in render texture with post-processing 0 Answers