FXAA for PCMASTERRACE (Ultra Extreme quality modification)

  • lordbean
  • Topic Author
More
2 years 5 months ago #1 by lordbean FXAA for PCMASTERRACE (Ultra Extreme quality modification) was created by lordbean
# Pastebin link here

You still just need the normal FXAA.fxh header for this. I technically stomped the quality defines in it, but I did it by redefining them in the shader code (easy to spot if you scroll through it). Looks WAY better than the usual FXAA settings to me. It's a bit gluggy, but not really any slower than predicated SMAA (which is still a LOT slower than normal FXAA).
The following user(s) said Thank You: Viper_Joe, Judge_K

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

  • lordbean
  • Topic Author
More
2 years 5 months ago #2 by lordbean Replied by lordbean on topic FXAA for PCMASTERRACE (Ultra Extreme quality modification)
Just updated the shader, pastebin link above is still valid. I discovered a completely unused extra quality pass above the predefined extreme setting in the FXAA header. The shader now not only stomps the preset in the header, it also configures the quality settings to activate that last chunk of code in the header to squeeze it for every last drop of what it can do. After some testing I've also determined that modern GPUs have easily enough power to run the quality defines as tight as they can go (performance hit is still no worse than predicated SMAA on my 6700 XT), so I've also made that change while I was at it.
The following user(s) said Thank You: Viper_Joe, 月铭山溪

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

  • mbah.primbon
More
2 years 5 months ago #3 by mbah.primbon Replied by mbah.primbon on topic FXAA for PCMASTERRACE (Ultra Extreme quality modification)
Is this just as simple as changing the QUALITY number ? I mean it was already there since the beginning.

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

  • lordbean
  • Topic Author
More
2 years 5 months ago - 2 years 5 months ago #4 by lordbean Replied by lordbean on topic FXAA for PCMASTERRACE (Ultra Extreme quality modification)
Nope, there are two things happening other than changing the quality number. I'm using a chunk of statements right after the #include FXAA.fxh to undefine and then redefine the individual pieces of the quality preset to a much more intensive level, and additionally the built-in quality presets will never activate the final pass in the header (not sure why this is). The FXAA.fxh internals will only ever set FXAA_QUALITY__PS to 12 at maximum, yet inside the actual subpixel handling routine there is a check to see if FXAA_QUALITY__PS > 12, which will never pass as true unless you do what I did and redefine it.

Edit: I've been trying it in several different games and I'm quite frankly blown away by the quality level this produces. This anti-aliasing method had a LOT of untapped potential, to the extent that I'm not even sure if the folks that developed it over at NVIDIA are aware of how good it can look when performance constraints are tossed out the window. I honestly can't tell the difference between my customized version of FXAA and the Temporal AA baked into most modern games (apart from a few key tells if you know what to look for), and coming from me, that's REALLY high praise. The only reason I don't use Temporal AA is because no matter how well it's calibrated, it produces a bit of ghosting, and said ghosting gives me headaches.
Last edit: 2 years 5 months ago by lordbean.
The following user(s) said Thank You: Viper_Joe

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

  • lordbean
  • Topic Author
More
2 years 5 months ago - 2 years 5 months ago #5 by lordbean Replied by lordbean on topic FXAA for PCMASTERRACE (Ultra Extreme quality modification)
As I, too, would honestly find my above statements very difficult to believe, here's a quick example. This image is captured using ReShade before/after screenshot. It's a No Man's Sky scene (docked in personal freighter) with a UI toast visible in the lower right to show impact on text (gives you a good way to see how much blur this preset causes). Scene is being slightly gamma corrected and then tonemapped, then has above customized FXAA and CAS sharpening applied.

imgur.com/a/SlxZft5
Last edit: 2 years 5 months ago by lordbean. Reason: Juxtapose not working for some reason. Linked imgur grouping

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

  • geisalt
More
2 years 5 months ago - 2 years 5 months ago #6 by geisalt Replied by geisalt on topic FXAA for PCMASTERRACE (Ultra Extreme quality modification)
hi, the link doesnt work for me. It probably allows to compare pictures located in the memory of the browser but it doesnt upload pics to the server?

anyway, i compared with linear light 0 and green luma 0 , there is no differences on my own screenshots in 1080p between your preset and fxaa.fx sets to 39 in the shader file.
All the pixels are the exact sames, i used a script to find differences... 0, i verified by eyes on paint.net in ulra zoomed too... on 5 differences sceneries.


IF you are sure that it does make a difference, we could speculate that the screenshots in png taken reshades arent lossless... or that 1080p is not enough to show the improvement.

fxaa.fx distributed in an old pack may have linear light 1 so it's behaviour could be wonky



The most recent fxaa.fxh distributed by reshade has this by default

/*============================================================================
                     FXAA QUALITY - EXTREME QUALITY
============================================================================*/
#if (FXAA_QUALITY__PRESET == 39)
    #define FXAA_QUALITY__PS 12
    #define FXAA_QUALITY__P0 1.0
    #define FXAA_QUALITY__P1 1.0
    #define FXAA_QUALITY__P2 1.0
    #define FXAA_QUALITY__P3 1.0
    #define FXAA_QUALITY__P4 1.0
    #define FXAA_QUALITY__P5 1.5
    #define FXAA_QUALITY__P6 2.0
    #define FXAA_QUALITY__P7 2.0
    #define FXAA_QUALITY__P8 2.0
    #define FXAA_QUALITY__P9 2.0
    #define FXAA_QUALITY__P10 4.0
    #define FXAA_QUALITY__P11 8.0#endif
your setting has this

    #define FXAA_QUALITY__PS 12
    #define FXAA_QUALITY__P0 1.0
    #define FXAA_QUALITY__P1 1.0
    #define FXAA_QUALITY__P2 1.0
    #define FXAA_QUALITY__P3 1.0
    #define FXAA_QUALITY__P4 1.0
    #define FXAA_QUALITY__P5 1.0
    #define FXAA_QUALITY__P6 1.0
    #define FXAA_QUALITY__P7 1.0
    #define FXAA_QUALITY__P8 1.5
    #define FXAA_QUALITY__P9 2.0
    #define FXAA_QUALITY__P10 4.0
    #define FXAA_QUALITY__P11 8.0
 

So something is strange...

 

edit: ok, you edited the shader to 13 some days ago...? and the original posted was 12? time to retry....
Last edit: 2 years 5 months ago by geisalt.

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

  • lordbean
  • Topic Author
More
2 years 5 months ago - 2 years 5 months ago #7 by lordbean Replied by lordbean on topic FXAA for PCMASTERRACE (Ultra Extreme quality modification)
Yeah, the first one I posted was only slightly changed from the original predefined outputs at PRESET=39. The new one now nukes the "approximation" entirely and maintains 1.0 all the way down the list, in addition to changing QUALITY__PS to 13 and defining QUALITY__P12 to activate the final subpixel check present (but entirely unused by default) in the header code.

The comparison image isn't actually embedded, you need to follow the link to look at it - I couldn't figure a way to get it to embed in the post. It's sourcing two images I uploaded to imgur, so it should load for anyone in theory - but I'll check and make sure I didn't do something wrong somewhere.

Edit: Seems you're right, there's something wonky about Juxtapose. I can generate a comparison and it works, but as soon as I reload from site (CTRL-F5) it breaks, which I presume is the behavior other people are seeing. Linked the imgur upload above instead.
Last edit: 2 years 5 months ago by lordbean.

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

  • xv0t
More
2 years 4 months ago #8 by xv0t Replied by xv0t on topic FXAA for PCMASTERRACE (Ultra Extreme quality modification)
Whatever happened to this shader? Any new updates?
Saw you released ASSMAA, HQAA and a couple of others in a new repository, interesting shaders, thanks for sharing!

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

  • lordbean
  • Topic Author
More
2 years 4 months ago #9 by lordbean Replied by lordbean on topic FXAA for PCMASTERRACE (Ultra Extreme quality modification)
I've pretty much left this alone as it was really just a customized configuration for the same core code. I used a lot of what I learned building HQAA v2.0 though.

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.