Here's my best-effort attempt to match TAA image quality using SMAA. (preset)

  • lordbean
  • Topic Author
More
3 years 3 months ago #1 by lordbean Here's my best-effort attempt to match TAA image quality using SMAA. (preset) was created by lordbean
I hate the shimmering TAA often causes, so I've been puttering at SMAA to see just how much I can coax out of it. I've got it tuned down to the point where it does a pretty good job of being a viable TAA alternative. The core concept here is to use a pre-pass of contrast-adaptive sharpening to help SMAA see where in the scene it needs to apply. Since I'm using it in this way, the preset for it looks pretty weird - but it seems to do the intended job fairly well. The pre-sharpening pass does also have some benefit towards the original intent of pulling the scene more into focus, although it should still be possible to run another sharpening routine after SMAA without generating artifacts - this may be desirable in some games with small UI elements since in order to match TAA's ability to round out curves, this SMAA preset is applying 100% effect to corners. Overall though, the pre-sharpen pass keeps SMAA from making TOO much of a mess of small UI elements. The SMAA pass is VERY aggressive and fine-grained, so you might occasionally notice small anti-aliasing artifacts in places where it's difficult for SMAA to tell whether there really is an edge or not. From my testing, these are very small, generally not attention-grabbing, and don't happen all that often. Compared to TAA shimmering, they're basically negligible.

This preset didn't really fit in the presets area because you can load this on pretty much any game that has TAA as an option and it should work. I've tried these identical presets on several already. You need the SweetFX package and the default ReShade package to apply this.
PreprocessorDefinitions=
Techniques=ContrastAdaptiveSharpen@CAS.fx,SMAA@SMAA.fx
TechniqueSorting=ContrastAdaptiveSharpen@CAS.fx,SMAA@SMAA.fx

[CAS.fx]
Contrast=-50.000000
Sharpening=50.000000
[SMAA.fx]
CornerRounding=100
DebugOutput=0
DepthEdgeDetectionThreshold=0.001000
EdgeDetectionThreshold=0.015000
EdgeDetectionType=1
MaxSearchSteps=112
MaxSearchStepsDiagonal=20
PredicationEnabled=1
PredicationScale=8.000000
PredicationStrength=4.000000
PredicationThreshold=1.000000

Please Log in or Create an account to join the conversation.

  • lordbean
  • Topic Author
More
3 years 3 months ago - 3 years 3 months ago #2 by lordbean Replied by lordbean on topic Here's my best-effort attempt to match TAA image quality using SMAA. (preset)
Here's some side-by-sides for comparison. Will try to add more games over time. TAA unquestionably wins any screenshot competition, but bear in mind certain games also shimmer like crazy with it (Satisfactory is a good example). There's no shimmering with the CAS-SMAA setup.

Borderlands 3


Satisfactory
Last edit: 3 years 3 months ago by lordbean.

Please Log in or Create an account to join the conversation.

  • lordbean
  • Topic Author
More
3 years 3 months ago #3 by lordbean Replied by lordbean on topic Here's my best-effort attempt to match TAA image quality using SMAA. (preset)
For some reason I can't edit or otherwise use the full message posting UI - tried both Chrome and Edge and both are just showing me a blank in the UI where the writing pane should be.

That aside, here's another preset using the same concept, only with a LumaSharpen prepass and Luminance edge detection. Seems to work fairly well, it detects edges overall slightly less aggressively but also seems less prone to interacting with UIs and other post process effects.
PreprocessorDefinitions=
Techniques=LumaSharpen@LumaSharpen.fx,SMAA@SMAA.fx
TechniqueSorting=LumaSharpen@LumaSharpen.fx,SMAA@SMAA.fx

[LumaSharpen.fx]
offset_bias=1.000000
pattern=3
sharp_clamp=0.010000
sharp_strength=0.900000
show_sharpen=0

[SMAA.fx]
CornerRounding=100
DebugOutput=0
DepthEdgeDetectionThreshold=0.001000
EdgeDetectionThreshold=0.015000
EdgeDetectionType=0
MaxSearchSteps=112
MaxSearchStepsDiagonal=20
PredicationEnabled=1
PredicationScale=3.5
PredicationStrength=4.000000
PredicationThreshold=1.000000

Please Log in or Create an account to join the conversation.

  • Daemonjax
More
3 years 2 days ago #4 by Daemonjax Replied by Daemonjax on topic Here's my best-effort attempt to match TAA image quality using SMAA. (preset)
It's weird that TAA causes texture shimmering/crawling for you because that's PRECISELY what TAA is supposed to fix.

Unless you mean ghosting. That's just what happens with TAA when fps drops too low.

Please Log in or Create an account to join the conversation.

  • lordbean
  • Topic Author
More
3 years 1 day ago #5 by lordbean Replied by lordbean on topic Here's my best-effort attempt to match TAA image quality using SMAA. (preset)
When TAA is not calibrated well (or when it is presented with a particularly difficult scene - Satisfactory's constructible foundations and walls are a good example of this), it can cause a LOT of shimmering. I've done a whole lot of experimenting with it in the Unreal 4 engine and found that configuring TAA in a way that makes it actually look good is surprisingly difficult.

As for ghosting, it always does that. It's simply a case of whether you notice it or not. I didn't think I noticed it, and in truth I did not CONSCIOUSLY notice it - the problem I discovered I have is that I UNCONSCIOUSLY notice it. Games that use TAA reliably give me a bad headache. Turn TAA off, I can play them all day. Which leads me back to SMAA...

SEGUAY...

I've been very actively trying to make SMAA produce a comparable still-image quality to TAA since when TAA is configured right, it really is gorgeous. The main snag I kept hitting with SMAA was that depending on how you configure it, it can be good at catching long aliasing (but then it fails to catch small aliasing), or good at small aliasing (but then failing to catch long aliasing). So it occurred to me - modern hardware has come a fair way since the SMAA routine was developed, which means I probably have, on average, more GPU power to work with. Why not try multipass SMAA?

This is where I eventually struck gold. It took fairly careful balancing to keep the individual passes from walking all over each other (and hence producing either a lot of artifacts or making small elements like text and UI super-blurry), but I managed to succeed in creating very good presets for both a three-pass and a two-pass SMAA profile. I am not referring to adding passes to the already-existing internal 4-pass structure the SMAA code uses here; I am talking about literally running the entire SMAA routine more than once but with different settings in each pass. Conceptually, the presets boil down to assigning different jobs to each full SMAA pass. In the three-pass version, the first pass is configured only to look for very-long aliasing and responds only minimally to anything else, which is accomplished mostly by using predicated edge detection (predication at a strength of 1 and local threshold reduction of 4 will actually detect some edges even if you set the SMAA edge detect threshold to 1.0). The second pass is the "standard" SMAA pass configured to find the bulk of the visible aliasing in the scene; it is deliberately a bit conservative to avoid colliding too much with the third pass. In both profiles, I have configured a normal contrast-adaptive sharpen to happen before the final pass of SMAA; this is because the last SMAA pass in both profiles is what I call the "blend" pass - it only checks pixels against two immediate neighbors, but its edge threshold is VERY low. This has the effect of both dealing with micro-aliasing and additionally simulating the sort of "rounding" effect that Temporal AA has on a scene. To understand what I mean, consider a view of an object at an angle where part of it is catching some light and part of it isn't - without anti-aliasing and even with morphological anti-aliasing, there is usually a rogue white pixel here and there due to the way rasterization handles lighting, whereas since Temporal AA both takes jitter samples of the current frame and also measures current frame against the last few previous frames, these rogue white pixels tend to disappear after TAA has been applied. That being said, it's still morphological anti-aliasing at the core, and although I find it does an excellent approximation of the TAA "upsampling" illusion, you can definitely tell it isn't TAA. The idea here is mostly for people who either do not like TAA or for whom TAA causes problems (such as headaches or motion sickness) to have a higher-quality option than FXAA or one-pass SMAA to choose, if they wish. The main difference between the two-pass and three-pass versions here is that the two-pass version merges the jobs of the first and second passes of the three-pass version into one routine, at a cost of a slightly higher artifact occurrence rate but at a gain of framerate. On my GTX 1660 Ti and averaging approximately 100 fps in No Man's Sky, I measured the overall impact per-frame of these presets as approx. 2ms for the two-pass and 3ms for the three-pass versions, resulting in a drop to either ~83 or ~91 fps depending which is in use.

Two-pass version: pastebin.com/qZr4KwFr
Three-pass version: pastebin.com/xnjxAYST

In order for this to work correctly, you need to go into the shaders folder after installing ReShade to the game and create the additional one (or two) SMAA.fx files (only the fx file needs to be copied, not the fxh file). Just copy-paste SMAA.fx in-place and rename the copies to SMAA2.fx and SMAA3.fx.

Please Log in or Create an account to join the conversation.

  • Daemonjax
More
2 years 11 months ago - 2 years 11 months ago #6 by Daemonjax Replied by Daemonjax on topic Here's my best-effort attempt to match TAA image quality using SMAA. (preset)
No man's sky did look horrible when I played it years ago, because the amount aliasing/shimmering was batshit crazy due to them rendering geometry at like half resolution due to performance reasons.

If you change it to render at full res (in settings .ini file or whatever somewhere), it should look normal and I imagine modern GPUs can handle it.
Last edit: 2 years 11 months ago by Daemonjax.

Please Log in or Create an account to join the conversation.

  • lordbean
  • Topic Author
More
2 years 11 months ago #7 by lordbean Replied by lordbean on topic Here's my best-effort attempt to match TAA image quality using SMAA. (preset)
I'm pretty sure they already did, at least on the PC version. The game still has a ton of situations that represent bad-to-worst case scenarios for post process AA though, so it made a great testing ground for feeling out good settings.

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.