Gen 5 Temporal Anti-Aliasing

Hi Guys,

sorry for the delay…

Gen5 TAA is very unforgiving if the motion vectors are incorrect. On a WPO animation, this can happen when for instance animating with a material parameter without a PreviousFrameSwitch node to also feed what was the material parameter at the previous frame. More information here: Utility Material Expressions in Unreal Engine | Unreal Engine 5.3 Documentation

Best tool to verify the motion vector of your world position animations is the motion blur visualizer show flag

I have made some improvements there in UE5 to be a bit more forgiving, but I won’t be able to cherry pick back this in UE4 due to how the code base has diverged a bit.

Yes, in fact I’ve made a change in UE5 so that r.BasePassForceOutputsVelocity=1 becomes automatic when r.TemporalAA.Algorithm=1 and r.BasePassOutputsVelocity=1

Don’t forget the r.TemporalAA.Upsamling=1 and change screen percentage, you can compensate the TAA by upscaling and go beyond and save frame performance by lowering r.ScreenPercentage without loosing to much quality in the upscaling. Gen5TAA and its costs are primarily intended for upscaling in term of quality but also performance. Many of it’s pass’s cost will scale with r.ScreenPercentage too.

I use r.ProfileGPU.Root=TAA and r.ProfileGPU.ShowUI=0 to quickly profile TAA in the editor’s console.

r.TemporalAA.Algorithm=1 r.TemporalAA.Upsamling=1 r.ScreenPercentage=50


LogRHI: 23.2% 1.29ms TAAU 2420x1221 -> 2420x1221 7 dispatches
LogRHI: 1.7% 0.09ms TAA ClearPrevTextures 2420x1221 1 dispatch 303x153 groups
LogRHI: 3.9% 0.22ms TAA DilateVelocity 2420x1221 1 dispatch 303x153 groups
LogRHI: 2.4% 0.14ms TAA DecimateHistory 2420x1221 1 dispatch 303x153 groups
LogRHI: 5.3% 0.29ms TAA FilterFrequencies 2420x1221 1 dispatch 303x153 groups
LogRHI: 2.3% 0.13ms TAA CompareHistory 2420x1221 1 dispatch 303x153 groups
LogRHI: 1.1% 0.06ms TAA DilateRejection 1210x611 1 dispatch 152x77 groups
LogRHI: 6.6% 0.37ms TAA UpdateHistory R11G11B10 2420x1221 1 dispatch 303x153 groups

r.TemporalAA.Algorithm=1 r.TemporalAA.Upsamling=1 r.ScreenPercentage=60


LogRHI: 17.3% 0.61ms TAAU 1210x611 -> 2420x1221 7 dispatches
LogRHI: 0.8% 0.03ms TAA ClearPrevTextures 1210x611 1 dispatch 152x77 groups
LogRHI: 1.6% 0.06ms TAA DilateVelocity 1210x611 1 dispatch 152x77 groups
LogRHI: 1.6% 0.06ms TAA DecimateHistory 1210x611 1 dispatch 152x77 groups
LogRHI: 2.1% 0.07ms TAA FilterFrequencies 1210x611 1 dispatch 152x77 groups
LogRHI: 1.1% 0.04ms TAA CompareHistory 1210x611 1 dispatch 152x77 groups
LogRHI: 0.6% 0.02ms TAA DilateRejection 605x306 1 dispatch 76x39 groups
LogRHI: 9.5% 0.34ms TAA UpdateHistory R11G11B10 2420x1221 1 dispatch 303x153 groups

Yeah I ran into similar issue on Lumen in land of Nanite demo. Fixed in UE5 and haven’t ran into other issues since to a point I was able to change the default of that cvar. I cherrypicked the simple fix from UE5 to 4.26.2 for you. :slight_smile:

Not as many as I had hoped, there has been some issues with devkit deliveries to test my changes, so we ended up needing to prioritize UE4 to remain stable given this is what Fortnite is shipping with on PS5 and XSX. Also there the source code has diverged quite a bit in UE5 that makes cherry picking some of the improvements back into 4.26 dificult. :frowning:

Stay safe! I’ll try to be a bit more responsive. Sorry about this :o