I was wondering why the motion vectors for animated scenes looked wrong when taken from the GBufferRaster, but they were correct in the VBufferRaster.
I replaced the respective code in the Source/Falcor/Scene/Raster.slang with the motion vector code from the VBuffer
Before (Raster.slang ~97): uint prevVertexIndex = gScene.meshes[instance.geometryIndex].prevVbOffset + vIn.vertexID;
After the fix: uint prevVertexIndex = gScene.meshes[instance.geometryID].prevVbOffset + vIn.vertexID;
I was wondering why the motion vectors for animated scenes looked wrong when taken from the GBufferRaster, but they were correct in the VBufferRaster.
I replaced the respective code in the Source/Falcor/Scene/Raster.slang with the motion vector code from the VBuffer Before (Raster.slang ~97):
uint prevVertexIndex = gScene.meshes[instance.geometryIndex].prevVbOffset + vIn.vertexID;
After the fix:uint prevVertexIndex = gScene.meshes[instance.geometryID].prevVbOffset + vIn.vertexID;
and now it works.