Hi
So I'm trying recreate the method of temporal reprojection from Killzone: Shadowfall; see this article for details, in DirectX 11.
In the vertical shader I calculate the current vertex position as normal along with its previous position using the previous matrices. The previous position is passed to the pixel shader with texcoord semantic as suggested by Nehab here. In the pixel shader i calculate its colour and along with a motion vector in a rwbuffer. Using the information I reconstruct the frame in a compute shader.
however I'm a little lost about how to calculate the the motion vector in the pixel shader. The motion vector is in the direction the pixel is moving in screen space, which the the current position will be in, but what about the previous position? I seem to be just getting garbage. I am I missing something or just misunderstanding the problem?
Any help would be appreciated
Andrew