NFAA Antialiasing Shader Needs an Upgrade

More
5 months 3 weeks ago - 5 months 3 weeks ago #1 by EFermi
So there's an AA shader called NFAA (Normal Filter AntiAliasing). It's been around for a while. I tried using it and to my perception, it provides the best quality of all I've seen - but there's a problem. Even though it provides superior edge antialiasing, it has a slight, but irritating artifacting problem, where some parts of textures appear like dots or grains of sand (will try to provide screenshots later). If this problem was fixed, we would have the best possible non-temporal antialiasing solution to ever exist. 
Last edit: 5 months 3 weeks ago by EFermi.

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

More
5 months 3 weeks ago - 5 months 3 weeks ago #2 by EFermi
Replied by EFermi on topic NFAA Antialiasing Shader Needs an Upgrade
Examples from F.E.A.R.:
NFAA (notice the "grainy dots" on the ground) - imgur.com/iRsHEDQ
NoAA - imgur.com/QHfJEYE

From Postal 2:
NoAA - imgur.com/Hd9Mj4F
NFAA - imgur.com/X1BysU3

And from Alan Wake:
NFAA - imgur.com/ekdAJH1
NoAA - imgur.com/tSQ9Beh

The overall AA quality of NFAA is, I think, far superior to any other non-temporal postprocessing, and it is fully compatible with other AA modes without creating occasional weird edge artifacts or stray pixels of odd colors (like when using MSAA/SSAA with SMAA/FXAA on top or trying to combine FXAA/SMAA). All that's left to do is make NFAA filter those grains together with the rest of the texture. 
Last edit: 5 months 3 weeks ago by EFermi.

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

More
3 months 4 weeks ago #3 by Shady
Replied by Shady on topic NFAA Antialiasing Shader Needs an Upgrade
I cannot really identify the issue in the images. Can you draw some circles around the area in the images which have the issue?

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

More
3 months 2 weeks ago - 3 months 2 weeks ago #4 by EFermi
Replied by EFermi on topic NFAA Antialiasing Shader Needs an Upgrade
imgur.com/HsDa4qT 

In the selected area, there are like small 1-2 pixel sized sharp grains on a smooth texture. They are all over ground texture to be precise. The image should be viewed at 100% resolution to notice, if you scale it probably won't be as pronounced. Maybe the imgur site itself provides some image compression, so yo need to save image and then view it, but it seems fine to me as is, so IDK.

Here is a rough side-by-side with a fragment of NFAA'd image inserted onto a regular one:
imgur.com/s2ynUWA
You should probably see the connection point between two parts.
And one more: 
imgur.com/uZccoAe
Last edit: 3 months 2 weeks ago by EFermi.

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

More
3 months 2 weeks ago - 3 months 2 weeks ago #5 by EFermi
Replied by EFermi on topic NFAA Antialiasing Shader Needs an Upgrade
Here is one more example from Dear Eshter:

No AntiAliasing: imgur.com/RPn0LFo 
FXAA: imgur.com/lPEbqEz 
NFAA: imgur.com/XE3BHR5 

FXAA is the best one so far in regards to edge smoothing, but it has a HUUUGE drawback which is it is not very accurate on the edges - sometimes you get a pixel or two from a neighbouring object blurring into something else. SMAA plain sucks when it comes to smoothing thin foliage (transparent textures, also known as alpha-channel) - the grass stays aliased no matter the config. NFAA is subtly smooth edge-wise and produces superb results at 4K resolution (the antialiasing effect itself isn't as strong as FXAA/SMAA therefore it might look worse on lower resolutions), BUT! just look at that grass patch at the center top on the hill - it's dotted AF! Also you can see similar dots on some of the hill surfaces. It's as if when the algorythm encounters a very bright pixel group in texture, it refuses to apply. As a reference, look how FXAA method processes it - there's almost no granulation present whatsoever. 

Also, I opened the screenshots from my phone and noticed that imgur actually does compress images quite a bit, making it extremely hard to notice specifics, but it doesn't happen on PC (at least, not in my browser). 

Overall, what I envision is an antialiasing method that smoothes foliage and textures like FXAA, but treats edges like, well, NFAA. Using NFAA on top of FXAA is a) too blurry to effectively compensate with sharpening without causing artefacts b) still delivers misinterpreted pixels (albeit less noticeable, because blur), masking the problem, but not fixing it. 

This is quite annoying, seriously. Out of, I believe, 6 or 7 AA shaders I've tried, none seems to "hit the spot". FXAA is too messy, SMAA fails on foliage, NFAA has granularity artefacts and its derivative DLSS-style is orders of magnitude messier than even FXAA, so is DLAA; Pirate FXAA is just some sort of edge blur; some temporal motion interpolation I digged out on the forums blurs like early 2000s motion blur attempts (albeit it does prevent edge jittering) and has no static mode (when you stand still you can see aliased edges in all their glory). 

Which pushes me to the point - why don't we have a superb quality resource hog of an AA shader for powerful GPUs that sacrifices pathetic performance optimisations for raw unadulterated quality? Even if it has performance requirements of a 4x MSAA, if it works as good or better, why not yet? Or something like software-based supersampling? GeDoSaTo had the right idea but went in a wrong direction of making an actual forced downsampling tool which only works for few DX9 applications instead of creating a resampling/interpolation shader (also being an ordered grid interpolation "classic" supersamling it barely manages to sit in between 2x and 4x MSAA in quality even at twice the resolution (7680x4320), and if you try to use built-in shaders to add AA pre-downsampling while scoring ReShade in-game it just crashes the game, while using ReShade injects post-downsampling).
Last edit: 3 months 2 weeks ago by EFermi.

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

More
2 months 4 weeks ago #6 by Digika
Replied by Digika on topic NFAA Antialiasing Shader Needs an Upgrade
How can you possibly think it is best with such amount of blurring?

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

More
2 months 4 weeks ago - 2 months 4 weeks ago #7 by EFermi
Replied by EFermi on topic NFAA Antialiasing Shader Needs an Upgrade
Blur is better than misinterpreted pixel on edges here and there. Of course, none of the two would've been perfect, but that's only viable for MSAA/SSAA. Maybe someone will manage to port FSR into ReShade same way they did CAS, then we'll see.
Last edit: 2 months 4 weeks ago by EFermi.

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

More
2 months 2 weeks ago #8 by Kleio420
Replied by Kleio420 on topic NFAA Antialiasing Shader Needs an Upgrade

So there's an AA shader called NFAA (Normal Filter AntiAliasing). It's been around for a while. I tried using it and to my perception, it provides the best quality of all I've seen - but there's a problem. Even though it provides superior edge antialiasing, it has a slight, but irritating artifacting problem, where some parts of textures appear like dots or grains of sand (will try to provide screenshots later). If this problem was fixed, we would have the best possible non-temporal antialiasing solution to ever exist. 
 

yea the thing is nfaa is a normal filter for texture aliasing and was never finished from the original developer as it was a test type thing in a project they were working on back in like 2014 ,what ever it does on here has been changed to even run or work its not meant to look for edges outside like your suggesting its spose to work inside textures using a normal map to help determine line edges inside " inside" said texture to help with compression and other artifacts thats were the filter in the name comes in like i said i dont think he/she ever finished it. Example if there was a line of words inside a sign post and the texture compression or what ever messed this up the nfaa idea was to determine what has an edge inside the normal map as refrence then correct this aliasing so the words or edges werent jagged or blurry.

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