r.TemporalAASharpness does nothing

Mentioned by Epic staff here: Mesh 'trails' appearing in front of certain materials? - Rendering - Epic Developer Community Forums

See PostProcessTemporalAA.cpp:

			float Sharpness = CVarTemporalAASharpness.GetValueOnRenderThread();
			// With the new temporal AA, need to hardcode a value here.
			// Going to remove this once the new temporal AA is validated.
			Sharpness = -0.25f;
			Sharpness = 1.0f + Sharpness * 0.5f;

CVar value is read but then discarded. It seemed to have no visual effect when I tried it in game, so I went to see why.

If this CVar has been deprecated, it should probably be removed or give some kind of warning.

Hey cancel,

This actually looks like a Motion blur issue. Try setting the motion blur within your project to zero for all the values. Motion Blur Max, Motion Blur Amount, and Per Object Size.

Let me know if this has an effect, or if the issue is still present.

Thank you,

Hi , thanks for responding.

I disabled motion blur (both with console vars and with postprocess settings) and there was no noticeable difference in the image between r.TemporalAASharpness 0 and 1 (or any number between), either still or in motion.

I’m looking through the UE4 source code right now (4.8.3) and I can’t find any place other than the line above (in PostProcessTemporalAA.cpp) where the r.TemporalAASharpness variable is referenced. Do you know if it’s used anywhere else? If it’s only used in that place above, then it’s definitely not doing anything, because the value is discarded on the line after it’s read from the CVar.

Hey cancel,

That is interesting that is is discarded. Have you made sure that you are in fact using Temporal AA elsewhere and it is working within the project itself? To test and see if your Post processing is having an effect on your scene, or what you are looking at use the console command ‘ShowFlag.PostProcessing 1’ to enable post processing. Toggle this off and on, and if you do not see any visual change, your post processing is not functioning.

Let me know what you discover.

Thank you,

Yup, postprocess effects are definitely working. Toggling PostProcessing via showflags definitely disables the tonemapper, temporal AA, etc. when I disable it.

The commit/changeset where this behavior was introduced is here: https://github.com/EpicGames/UnrealEngine/commit/262d4ffde631395c6bfa6f9ebad0ab79328ce727

This change sets the Sharpness variable to a fixed value (-0.25f), disregarding the CVar value after reading it. It appears to me that the r.TemporalAASharpness CVar hasn’t done anything since June 2014. (I could very well be mistaken, though, but I can’t find it referenced anywhere else, and it really doesn’t seem to have any effect on the image.)

Hey ,

Sorry to bump this question, but do you have any updates to this issue? I’m curious about what’s going on here.

Hey cancel,

I have attempted to look through our non-public GitHub commits for any recent changes to this variable, but did not find anything concrete. I looped in the developers for insight to this issue and they returned with the information below.

The value was getting overridden until recently. It should work as expected for 4.9 in the full engine release. The effect is very subtle though. Added the value of 2 to pick catmull rom which it didn’t do before.

Thank you,

Great, thanks!