Updated 03.09.2017
Rewrote most of the code and put it into separate files. [HR][/HR]
I’ve added a step to the TAA post process that sharpens the image without destroying the initial TAA result.
It produces sharp textures while preserving smooth edges on foliage, characters etc…
r.TemporalAASharpen between 0.1 and 0.3 gives good natural results. Imgsli
It produces sharp textures without the edge artifacts that Tonemapper.Sharpen does. Imgsli
How it works
It creates a temporally stable depth mask (Imgsli) that is used to blend out edges that should not be sharpened.
It also uses the color contrast to create a secondary mask (Imgsli) that is used to blend out high contrast pixels. This mask is very subtle, and helps to avoid sharpening already high contrast pixels that usually results in white or black borders. (Zoom in: Imgsli)
I’m hoping to give this a go tomorrow or this weekend some time (I just upgraded my fork to 4.17.1 so I am tired of engine builds for the day), but nice work, this looks rad. Does it hold up in-motion, since that’s largely where TAA is at its worst.
Have been coming across these same things on my own project, trying to compromise between AA types and how it affects art, ghosting, etc. I think I’ve come to a compromise but, I would like to try out your settings, unfortunately the page returns with a 404 page not found error. Also was curious, did you make all of this through blueprint with console commands or was it some kind of material programming and/or coding?
It’s run right after TAA every frame, so it should do a good job every frame. It won’t remove stuff like ghosting though, that can be dealt with by other settings/tweaks.
You need to be signed into github and have access to the UnreanEngine repo. This is a tweak to the core engine, not a blueprint or material.
Updated the code with the console variable r.TemporalAADynamicSharpen. 0.2 - 0.25 is about the same as with no AA, but works quite a bit higher.
It’s more forgiving than normal sharpen with extreme values.
That one is for ghosting when you move the camera around. This is for the the blurry textures you get from TAA.
They solve different problems, but I think they could work well together.
I think the other one is also for making the scene appear more sharp.
How well does your sharpening work with SSAO? The tonemapper sharpen makes the SSAO very noisy again.
Why would those comments be needed? You see the commits he made, so you can just merge those commits and its clear what changed in those. I think comments in the code indicating where something was changed would just make it ugly.
The other changes make the scene more sharp when you move around. I don’t think it should change the sharpness when the camera is stationary?
This method should have no effect on SSAO. Try it out!
I want eventually want to submit this as a pull request. Comments would be nice if it was just for custom integration.
Will still have to clean up some of the code, it’s not done yet.
I gave it a go but I had some compiler errors. after fixing them the engine crashes on startup complaining that it failed to compile the shader
I guess I really need 4.17 for this? I’m on 4.16 at the moment but I could try once I update to 4.17
It’s against the current master branch (4.18), so there might be some changes it doesn’t like. Easiest to just download the whole thing.
I don’t know enough to answer if there are parts there that are new after 4.16. What is the shader error? You can turn on shader compilation errors in consolevariables.ini