TSR artifacts when using Material Parameters in WPO / Vertex Shader

Heyo.
I came across an issue when working on a Wind Material. I noticed that when I started driving some of the Material Parameters from Blueprint that my foliage started to look blurry. I spend the better part of yesterday to identify the issue.

Looks like when you change anything that affects the Vertex position using a Parameter the TSR Reprojection doesn’t create motion vectors and causes artifacts.

When using the internal time instead of the the blueprint created time it works without issues

I’ve tried a bunch of methods to work around this, like using a dynamic material instance instead of Parameter Collections, trying to find any issues with the values itself (float precision, rounding issues), running the values into UVs of a texture sample but nothing worked. As soon as the parameters change from blueprint or manually by changing the values in the editor UI, the motion vectors disappear.
Switching to TAA or any other AA “fixes” the issue.

Here is a screenshot of the blueprint creating the running time for context

Looks like I figured out how to fix this.
One has to record the previous frames value in blueprint and feed it to the shader using the “previous frame switch” node. Like that the shader can calculate the correct motion vector for the reprojection.
Hope this helps other ppl who run into this issue

1 Like