(H)ybrid high-(Q)uality (A)nti-(A)liasing (HQAA)

More
3 months 1 week ago #301 by klotim
github.com/mj-ehsan/NiceGuy-Shaders/blob/main/HoleFiller.fx
Will problably be a good mix with this shader:
"HoleFiller is made to assist AA shaders handle trees better. Fills harsh holes between tree leaves and vegetation. "

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

More
3 months 1 week ago #302 by EFermi
Found a most enjoyable article about antialiasing, dated 2019: www.overclockersclub.com/reviews/serious_statistics_aliasing/ 

Maybe someone else would find it interesting.

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

More
3 months 1 week ago #303 by lordbean
I've changed over to a system where I'm pushing one update per calendar day (if I've done any work on the shader in that particular day). Over the last couple of days, I've made some improvements to dynamic thresholding and SMAA line detection as well as implemented full user control over spurious pixel detection and handling in the optional image softening. Performance should be expected to be slightly worse due to SMAA spending more time tracing out lines.

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

More
3 months 3 days ago #304 by EFermi
Today I learned SRAA is a thing, but it seems to not be ReShade-friendly. And I never even saw it in games.

research.nvidia.com/publication/2011-02_...ruction-antialiasing

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

More
3 months 3 days ago #305 by lordbean
Looks like it was probably discarded in favor of Temporal AA, based on the publication date. The concept looks interesting but I don't think it's ReShade compatible as it appears to require the game to generate supersampled versions of both its depth and normal buffers.

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

More
2 months 2 days ago #306 by Digika
Yeah, seems like industry moves into AI memes territory with temporal pass. Gen5 TemporalAA inEU4.27 and 5 does wonders, bascially 0 jitter with super-sharp image but the cost ofit as heavy as the truck full of cows.

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

More
1 month 3 weeks ago #307 by ssn650
Hi lordbean
I'm really enjoying your HQAA solution for a DirectX 8 game I'm playing in CrossOver / Parallels Desktop on a MacBook Pro, where anti-aliasing isn't provided by the default graphics driver.
I have a question about the settings. I noted in the HQAA.fx file that there are a number of presets included, and since I'm using FakeHDR I added the following entry to my SweetFX_Settings configuration file:

[HQAA.fx]
HQAA__Global_Preset=7

Is this correcty formatted and do you have any recommendations / descriptions of the other presets that can be selected? Are there other parameters we can list under [HQAA.fx] in the configuration file to tweak the HQAA settings and see what differences they make?

Cheers
Geoffrey

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

More
1 month 2 weeks ago #308 by lordbean
I haven't personally used HQAA via SweetFX injection so I'm not familiar with the syntax it expects when parsing the file. Yes, there are a lot of user-configurable pre-processor defines - the best way to learn them would be to use it via a standard ReShade injection in a DirectX 9 or higher title since it will present them neatly to you when you expand the category.

Alternatively, if SweetFX offers an ingame configuration method similar to ReShade, you can pretty much duplicate the effect without using the global preset. The basic optional effects are enabled by default, and the one you want is under Color Palette. Enable that category, and pick Logarithmic Fake HDR from the tone mapper dropdown. The effective maximum strength for the parameter is euler's number, 2.718282 (approx). It will start to artifact if you go higher.

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

More
1 month 2 weeks ago - 1 month 2 weeks ago #309 by ssn650
Thank you!

I entered the Home screen during game play and noted that HQAA.fx was indeed selected and compiled.
After closing the game, the following entries were added to my SweetFX_Settings.txt file

[HQAA.fx]
HqaaAboutEOF=0
HQAAintroduction=0
HqaaOptionalsEOF=0
HqaaOptionsEOF=0

I've gone back to the default HQAA settings (without loading Preset No. 7 HDR) because I prefer them and since I've also loaded FakeHDR shaders probably don't need them anyway.

Cheers
Last edit: 1 month 2 weeks ago by ssn650.

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

More
1 month 2 weeks ago #310 by TOGfan
I decided to play around with the temporal stabiliser mode and made some improvements that I think are worth sharing.
First I noticed that when using the temporal persistence mode together with clamp weight mode it created a significant amount of blurring because it used the previous frame with the stabilisation already applied and compared it with current frame without stabilisation. I changed it so that it uses only the previous frame without stabilisation.
I also added a treshold slider which completely disables blending if the weight falls below the treshold which limits blur and a frame limit slider which limits the weight of previous frame blending. I also implemented an adaptive temporal presistence mode which chooses between temporal persistance mode and normal mode per pixel based on which has the smaller difference to the current frame, which minimizes blur added by persistence mode.
If you like these changes lordbean, you can add them in the next update.
Warning: Spoiler!

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

More
1 month 2 weeks ago #311 by lordbean
The temporal stabilizer tends to rate low on my priority list of things to improve since I don't typically use it for everyday gaming personally - though I agree there are some parts of it that probably need improvement. The previous frame weight setting is a bit nebulous since it really only acts as a starting point and can be altered quite a bit by the other options on the fly.

Just for reference, disabling temporal persistence isn't the same thing as disabling previous-frame blending altogether. With temporal persistence disabled, HQAA will use the previous frame before stabilization as the reference to blend with the current frame, meaning stabilization changes do not persist to subsequent frames (hence "Temporal Persistence").

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

More
1 month 2 weeks ago #312 by lordbean
It's been a while since I mentioned an update here, so I'll do so now - although it's in LTS and likely largely final, I've continued to make small improvements to the shader over the last month or two that have gradually increased the quality of the output quite a bit. If you use it and haven't updated it in a while, you might want to consider doing so.

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

More
1 month 1 week ago #313 by whamy03
Hi! i'm new with these reshade thingy, i really love comparison images that you posted.. Any idea where i can get the repository for your reshade?

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

More
1 month 1 week ago #314 by Kleio420
to say its never been used in games would be a hard one lot of games dont go out and tell you how their post aa/taa work and they may have been built around some of the concepts inside this. I think it is safe to assume nvidia likes to make aa algs to never use or do anything meaningful with them most likely due to better implimitations being made by lone devs. Txaa used in a hand full of games , temporal supersampling fxaa(fxaa 4.0) was never used and passed up for txaa and mfaa, then "DLAA" never got used till just recently even tho it was the original baseline of dlss their original rtx video shows dlaa off before dlss was ever announced.Nice thing is them doing all this gives public info on how they work for other devs to take inspiration from and keep making better methods, just like lordbean is doing playing around trying to improve how smaa/fxaa work honestly if its not been done yet you should rewrite a new file instead of using the original headers and optimize the code before going any further making a new framework to base future code off but hey my opinion.

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

More
1 month 1 week ago - 1 month 1 week ago #315 by lordbean
I actually merged the FXAA and SMAA headers into HQAA quite a while ago so that I could edit any part of the code I wanted to. My FXAA in particular works quite a bit differently than the original nvidia version at this point. I've changed SMAA some too, but not as much as FXAA.

@whamy03 - github.com/lordbean-git
Last edit: 1 month 1 week ago by lordbean.

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

More
3 weeks 6 days ago #316 by lordbean
The core effect of HQAA (the anti-aliasing) is effectively complete at this point. Although I may revisit the optional effects over time, I believe I have reached the point where very little (if any) further improvement is possible. As far as I can tell, the anti-aliasing effect offered by HQAA (and its freshly-updated Lite edition) is more or less flawless. I am only aware of one specific edge pattern that HQAA does not always fully correct, and it is a pattern which SMAA has extreme difficulty with, and which FXAA is completely incapable of correcting.

Additionally, I have also added some of the fast optional effects in HQAA to QXAA (the stand-alone implementation of the FXAA shader used in HQAA). For those looking for a very good quality AA effect but without much GPU headroom, QXAA can offer a lot of improvement for relatively little input cost in GPU time, and can now also fill basic functions like sharpening, saturation, brightness, etc.

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