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

More
3 months 4 weeks ago - 3 months 4 weeks ago #161 by SilentPrayerCG
Replied by SilentPrayerCG on topic (H)ybrid high-(Q)uality (A)nti-(A)liasing (HQAA)

I have just noticed that when I use the load only enabled effects option in reshade the artifacts disappear, so they might be caused, at least for me,  by incompatibility with other shaders.
 
 

i have only cas smaa fxaa and hqaa in witcher
and some standard stuff like lut.fx dysplaydepth.fx etc

i've tested "load only enabled effects" and yea, artifacts gone... strange

update
i started to enable shaders one by one, and flag "load only enabled effects" stops removing artifacts when smaa.fx is enabled too.
so if it is conflict, it's apparently smaa shader, but i need to check in other game, to check if hqaa is actually working
Last edit: 3 months 4 weeks ago by SilentPrayerCG.
The following user(s) said Thank You: lordbean

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

More
3 months 4 weeks ago - 3 months 4 weeks ago #162 by lordbean
Hmm, that's fairly odd. In theory HQAA should be compatible with having SMAA loaded, and possibly even running. I'll try it on my system and see what happens.

Edit: that didn't take long. HQAA is in fact incompatible with SMAA (even while SMAA is disabled but loaded). I'll see if I can figure out correcting it, but I'm honestly not sure why this is the case. HQAA uses different internal names for all the textures and samplers.
Last edit: 3 months 4 weeks ago by lordbean.

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

More
3 months 4 weeks ago - 3 months 4 weeks ago #163 by SilentPrayerCG
Replied by SilentPrayerCG on topic (H)ybrid high-(Q)uality (A)nti-(A)liasing (HQAA)

Hmm, that's fairly odd. In theory HQAA should be compatible with having SMAA loaded, and possibly even running. I'll try it on my system and see what happens.

I've tested it on Soulstorm again (since it's old and i can easily see aliasing), and with this method AA defenitily working, but i don't know how to determine if it's working correctly.
Integrated CAS seems to be working, not sure about Stabilizer, since i cant see any text crawl (i know what it is, I've noticed it long time ago on regular SMAA in certain settings)
Last edit: 3 months 4 weeks ago by SilentPrayerCG.

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

More
3 months 4 weeks ago - 3 months 4 weeks ago #164 by lordbean
Ok - 13.1 posted. I BELIEVE, at this point, and I'm not holding my breath, that it works - even if SMAA is in the list.

Can you tell I'm still pretty new to programming? LOL

Regarding the temporal stabilizer, it's definitely best not to use it if you don't see anything that's bothering you in the HQAA results. It can dampen how much a twerking line jumps out at you, but it'll cause ghosting to some degree.
Last edit: 3 months 4 weeks ago by lordbean.

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

More
3 months 4 weeks ago #165 by SilentPrayerCG
Replied by SilentPrayerCG on topic (H)ybrid high-(Q)uality (A)nti-(A)liasing (HQAA)
As me having basic programming knowledge - no, i thought you pro)

It seems to be working now properly.
Also I've only now noticed it adds ~20% gpu load when enabled, damn.
Even in potato mode its pretty big gpu load - about 10%/

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

More
3 months 4 weeks ago - 3 months 4 weeks ago #166 by Tojkar
It is indeed working now.

There's a one thing on the quality I noticed. Check the circle around the ship. Bottom and left sided are anti-aliased, but top and right sides are almost bare from it. It The difference seems to be the black background where it's not working as opposed to blue. I used GlaDos preset.

EDIT: "Check the circle" and then I proceed to not post the picture. *facepalm* Well, I guess it wasn't even needed after all.
Last edit: 3 months 4 weeks ago by Tojkar.

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

More
3 months 4 weeks ago - 3 months 4 weeks ago #167 by lordbean
Yup, I've actually noticed occasional edge detection failures against black backgrounds also. They're very rare so I haven't put much effort into trying to fix them yet, I was more worried about getting the shader working properly first.

As far as usage goes, yes, HQAA is a heavy shader. The core idea behind it is to use the extra horsepower available in modern GPUs to deliver more accurate results than other (faster) options.
Last edit: 3 months 4 weeks ago by lordbean.

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

More
3 months 4 weeks ago #168 by SilentPrayerCG
Replied by SilentPrayerCG on topic (H)ybrid high-(Q)uality (A)nti-(A)liasing (HQAA)
Yeah... modern GPU... :)
May be some day I will see it.

Sadly this shader doesn't eliminate edge shimmering in movement, but i guess it's impossible, without supersampling (which my not modern GPU usually can't handle without FPS drops) or proper TAA (which my GPU actually can handle, but old games lacks of it).
Some games really suffer from it, like Dark Souls 3 and The Evil Within 1.

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

More
3 months 4 weeks ago #169 by lordbean
Perhaps not impossible without TAA, but definitely extremely difficult. Games with proper TAA setups are able to use their engine's motion vector data to do predictive anti-aliasing, which is why they're able to eliminate that shimmer during movement. Without knowing the motion vectors, the only alternative is just to keep pushing for more accurate per-frame edge detection.

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

More
3 months 3 weeks ago - 3 months 3 weeks ago #170 by lordbean
v13.5 is now available, it should eliminate most cases of missed edges in dark scenes and additionally sports a completely rebuilt (and much more thought-out) process of calculating the FXAA blending. Its results are very stable even on GLaDOS, displaying far less tendency to cause edge flickering than previous versions.

New major revision v14.0 now available. It's pretty much the v13 strain after a training montage - useful code has been fine tuned, not-so-useful code has been trimmed. v14 runs significantly fewer total passes than v13 due to removal of edge detection inputs that weren't really helping. New debug mode also included to view how FXAA is blending its outputs.

Also I discovered ReShade has an IDE built into it. That may or may not have had something to do with this update.
Last edit: 3 months 3 weeks ago by lordbean.

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

More
3 months 3 weeks ago #171 by lordbean
14.1 now available. I made further considerable improvements to the edge detection maths in both SMAA and FXAA. 14.1 is able to detect low-contrast edges with a much higher success rate than previously.

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

More
3 months 3 weeks ago - 3 months 3 weeks ago #172 by lordbean
14.3 now available. Since I've been including small utility shaders as optional extras in HQAA, I've now implemented a pre-processor setting that allows you to disable the optionals to skip compiling all associated code (when in performance mode) if only the core AA technique is desired.

Edit: version is now 14.4, which considerably improves the performance of the shader. Feature set and visual outputs are essentially unchanged.
Last edit: 3 months 3 weeks ago by lordbean.

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

More
3 months 3 weeks ago #173 by SilentPrayerCG
Replied by SilentPrayerCG on topic (H)ybrid high-(Q)uality (A)nti-(A)liasing (HQAA)
Do performance can vary between different games? Is some it's 20-30 gpu load, but in The Evil Within it about 15 (even less with latest version)

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

More
3 months 3 weeks ago #174 by lordbean
Yes, it can vary quite a bit between games. Although the shader itself doesn't change, the way ReShade builds the compiled code is often going to be different between different titles (ReShade is essentially an abstraction layer - a sort of middle-man built to translate one universal high-level language into a set of machine instructions that will work under whatever conditions the 3D engine is running). As a general rule as well, the amount that you're likely to notice the extra load on the GPU depends on how CPU-bound the game is - well-optimized games that are able to keep the GPU at 100% load will show a much stronger impact from HQAA (and other shaders) than games where the CPU phase of the frame is slow and not keeping the GPU fully loaded.
The following user(s) said Thank You: SilentPrayerCG

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

More
3 months 3 weeks ago #175 by lordbean
v15.0 now available. I found a way to remove the other additional texture HQAA was declaring, so it now uses the same total number of declared textures as SMAA when the optional techniques are disabled (the temporal stabilizer uses an extra one to save the previous frame). While I was at it, I also went through and streamlined as much of the code as I could, with the result being v15 is considerably faster than previous versions (although I also increased the quality of the GLaDOS preset in particular because of this, so if you're using it, you might not see a huge difference immediately).

For the curious, I got rid of the extra support texture that was used to hold altered copies of the framebuffer by rendering said copies to the SMAA blend weights texture instead. Once the edge detection phase is complete SMAA simply overwrites whatever was left over in the texture with the blending weights for the next step.

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

More
3 months 3 weeks ago #176 by lordbean
v15.2 is now available, which is mostly a general cleanup of the optional features offered by HQAA. All optional things HQAA can do are now toggled on/off via pre-processor defines and included in the main HQAA technique to improve performance and reduce clutter in the ReShade effects list. Framerate target quality clamping is now built as an optional feature and can be enabled/disabled in this way as well. To keep confusion as low as possible, all associated setup options for optional features appear and disappear depending on whether the feature is enabled or not, so you will only ever see configuration options for features that are enabled.

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

More
3 months 3 weeks ago #177 by klotim
15.3 doesnt compile:

23:00:10:765 [11648] | ERROR | Failed initializing "C:\Program Files (x86)\Steam\steamapps\common\Oblivion\reshade-shaders\Shaders\HQAA.fx":
C:\Program Files (x86)\Steam\steamapps\common\Oblivion\reshade-shaders\Shaders\HQAA.fx(1173,18-35): error X3528: can't force branch with gradients on non-inputs

dx9 32bit game

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

More
3 months 3 weeks ago #178 by lordbean
Should be fixed if you update to 15.4. I removed the branch statement it's complaining about because I couldn't measure any meaningful performance gain from it.
The following user(s) said Thank You: maciejsojka

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

More
3 months 3 weeks ago #179 by maciejsojka
Replied by maciejsojka on topic (H)ybrid high-(Q)uality (A)nti-(A)liasing (HQAA)
Hi!
Where can I download latest version HQAA?

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

More
3 months 3 weeks ago #180 by lordbean
github.com/lordbean-git/HQAA

There's a link to it in my first post, although as some have pointed out I could have done a better job of indicating that it's there. It's right at the start beside the hashtag.
The following user(s) said Thank You: maciejsojka

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