Side issue: with no engine changes there seems to be a bug with r.TemporalAASamples. If increased much beyond the default 8 (I noticed it starting at 12) it will periodically run with what looks like no jittering and a lot of aliasing accumulation, and then return to jittering and look fine, over and over. Also this ensure gets tripped:
And it seems TemporalJitterIndex goes negative. Seems the Halton function will always return 0 when it is given a negative index and that probably causes the oscillation between aliased/unaliased.
edit: Ah, it seems to only happen at low screenpercentages, and so be due to this line boosting the sample count beyond int8 positive range:
// When doing TAA upsample with screen percentage < 100%, we need extra temporal samples to have a
// constant temporal sample density for final output pixels to avoid output pixel aligned converging issues.
TemporalAASamples = float(TemporalAASamples) * FMath::Max(1.f, 1.f / (EffectivePrimaryResolutionFraction * EffectivePrimaryResolutionFraction));
(TemporalJitterSequenceLength gets set from that)
This line should instead clamp to 127, since it gets put into an int8 at some point:
I got some decent results. I’m just testing with individual meshes using VRS now because I couldn’t get the whole screen or the texture based one to work yet.
The chair on the left is using 2x2 VRS, and the one on the right normal 1x1. I added an additional mip bias of -1 since when using TAAU it is being sparsely sampled over many frames.
It seems to get significantly less aliasing with the 2 pixel TAA span, but still has some moving noise which I think would be able to be cleared up by making the reconstruction filter aware of VRS.
I think this kind of thing could benefit both this and nvidia’s DLSS with VR. The reconstruction itself could also output to a lower resolution too using VRS or its own logic, so that the texture bandwidth savings aren’t lost from the extra mip bias (for VR the periphery gets extra downsampling anyway due to lens warp).
In each image the chair on the left is using 2x2 variable rate shading.
Both Gen4 and Gen5 handled it similarly, with similar improvements with the increased span, I can’t remember which was screenshotted.
When using 4x4 VRS a changed pixel span up to 4 pixels made an even bigger improvement over the default span, but it started getting stronger moving noise and really needs adjustments at that point to not have the 4x4 pixel block edges and corners be seen as underlying features to reconstruct from.
I added a pull request here to fix the sample count overflow issue with temporal aa jitter (more likely for people to run into it with TAAU at low screen percentages, because the configured sample count gets amplified there):
I’d just like to say your work means a lot. And Communicating with us here is really rare from UE developers, no offense intended. It’s not like other engines, hard to find devs that give time to communicate with us here. Really appreciated.
Aliasing/ghosting is one of the biggest problems I face with dense vegetation in UE, anyone that improves anti aliasing is a legend in my eyes – so thank you.
Upgrading to UE5 seems to be fairly simple, so I’m really looking forward to the temporal improvements coming with UE5.
Have no effect when Gen5 TAA enabled in 4.*? I’ve tested multiple combinations and astronomical values there is 0 perceived difference so I assume they dont come into play?
@Guillaume.Abadie Thanks for some explanation in the thread. Little wonder if there’s any available paper/report about the optimization of Gen5 TSR, for either ongoing or completed version, compared to previous UE4 TAAU. Pretty interested about that
I was late to discover this, the next gen TAA solution has made me a believer again. I am amazed at how good this is, this is what I needed. I’m now sporting 50% screen resolution and I can barely tell the difference (and I almost always can).
Are you talking about the same AA as in this thread or is there a newer solution?
Perhaps the op of that thread didn’t tweak it enough?
But if we’re talking about the same AA as was shown in the Matrix demo, hoo boy, that wasn’t pretty… I mean everything else was spectacular, but the temporal smearing just grinds my gears so hard.
For jitter/instability at still image, you need to tweak TAA SampleCount and FrameWeight.
Either way when framepace is unstable and FPS spikes between crazy high and crazy low values - ghosting is inevitable due to nature of TAA
Yea, there’s a conflict between SpeedTree9 and Gen5 TAA, in UE5 this resulted in obvious ghosting and smearing, the SpeedTree support team told me to turn on “Output velocities due to vertex deformation” in the project settings, but it was useless, I rely heavily on speedtree, so I hope that solves the problem.
Anyway, I’m very grateful to have EPIC technicians here to answer questions, so thank you!
Hey, was the default TAA changed in later versions of UE4 and/or in UE5? Here are the TAA values I was using on UE4.27 for my Ultra preset, that look bad/different UE4.28 & UE5+
However using these same commands in newer versions or any build of UE5 produces DRASTICALLY different results. If you guys have changed the default TAA, I have two requests/questions
1 - What’s the best way to approximate the old TAA so I can get it back? Is there any CVARs I’m not utilizing
2 - Would you consider adding a similar command back to UE5.5 or something that changes TAA to match its older values like r.TemporalAA.Algorithm? The new TAA has some big benefits, but its not a 1:1 upgrade, the older version produces better results for what I’m aiming for.