nVidia's FXAA mode (anti-aliasing)

Discussion in 'Videocards - NVIDIA GeForce Drivers Section' started by TheHunter, Jul 20, 2011.

  1. CeeJay.dk

    CeeJay.dk Master Guru

    Messages:
    686
    Likes Received:
    0
    GPU:
    Radeon 6870
    I noticed that are some subpixel details like the fences that disappear because they are thinner than a pixel. FXAA and SMAA can't help you with those.

    Try combining MSAA or SSAA with SMAA.
    Or better yet, try downsampling together with SMAA - There is a guide here elsewhere on the forum.
     
  2. BetA

    BetA Ancient Guru

    Messages:
    3,950
    Likes Received:
    0
    GPU:
    MSI GTX670 PEOC@1350Mhz
     
  3. CeeJay.dk

    CeeJay.dk Master Guru

    Messages:
    686
    Likes Received:
    0
    GPU:
    Radeon 6870
    Good news everyone!
    Version 0.3 beta

    I think everything works now.
    LumaSharpen sharpens in linear space now instead of gamma space because SMAA uses linear space and I didn't bother to correct for it.
    This means the sharpening now looks different, but I haven't yet figured out if it's better or worse or just different. Need to do some more testing.

    LumaSharpen currently sharpens the edges processed by SMAA and it looks OK but I'm not sure whether or not I should even sharpen the antialiased edges. I may decide to simply leave them be and have really smooth (but not sharp) edges and just let LumaSharpen bring out the detail in the textures.

    I also think HDR and Bloom works OK, but I need to do more testing on them.

    There is also a new feature - Presets.
    If you open the preset.h file you can choose which settings file to use.

    The default is settings.h but you can make a copy of your settings.h file, name it something else and point preset.h to it instead.

    This allows people to save their different favorite settings and more easily exchange them with each other.

    For example I could make some good Skyrim settings that I liked and copy my settings.h and name the new copy "CeeJays awesome Skyrim settings.h" and change preset.h to point to it.

    I could then share it with my friends and they could just copy the file to the right folder and change their preset.h file without messing with their own favorite settings.

    I still haven't decided on a better name - some ideas are :

    SweetFX
    SweetShader
    SweetShaderFX
    SweetSuite (just kidding)
    ShaderSuite
    ShaderFXSuite
    CustomFX
    CustomShaderFX

    What are your thoughts?
     
    Last edited: Aug 6, 2012
  4. Bat_Zonko

    Bat_Zonko Active Member

    Messages:
    87
    Likes Received:
    0
    GPU:
    Sapphire 7950 OC
    Awesome. Just tried it out in Divinity 2 DKS and did some comparisions to my FXAA Injector settings (copied over my Luma and Tonemap settings).

    Looks real good. The SMAA does a bit better job at handling contrast/dark-levels then the FXAA does (in not losing any texture quality in those areas), so that is where I noticed the difference. Beyond that, runs the same and looks great.

    This is exactly what the SMAA injector was missing. It handles AA in some games better then FXAA (and vice-versa), but I hated losing the added benefit of the Luma Sharpen (which is a real God send for image quality) and the tonemapping.

    I'm as happy as a little girl right now! (Dieter voice for any old SNL fans) Add this to finally getting downsampling to work correctly on my AMD card, and I am very satisfied.

    As for the naming, I would suggest you at least use your handle as a Prefix. Something that has CeeJayDK on it. Like CeeJayDK_Luma-SMAA or something. But, more snazzy and less boring :) CeeJayDK_GamersSexWax might work.

    Bats
     

  5. CeeJay.dk

    CeeJay.dk Master Guru

    Messages:
    686
    Likes Received:
    0
    GPU:
    Radeon 6870
    I'm currently leaning towards CeeJays SweetFX Shader Suite , or just SweetFX for short.

    SweetFX is a play on words - it's a suite of shaders.
     
  6. TFL Replica

    TFL Replica Master Guru

    Messages:
    381
    Likes Received:
    0
    GPU:
    NVIDIA GTX 970
    SweetFX sounds good.
     
  7. tsunami231

    tsunami231 Ancient Guru

    Messages:
    7,570
    Likes Received:
    1
    GPU:
    EVGA 660gtx sig2
    out of curiously when nvidia say FXAA HQ are they referring to there built in FXAA in there nvCP?
     
  8. CeeJay.dk

    CeeJay.dk Master Guru

    Messages:
    686
    Likes Received:
    0
    GPU:
    Radeon 6870
    Here is InjectSMAAmod Version 0.3

    Changelog:
    "..simplifies the installation, by making d3d9.dll and dxgi.dll load different .fx files so they can coexist in the same directory.
    You no longer need to find out what DirectX version you need to use, just copy the all files and the game will load the correct one."

    The next release of what I'm now calling CeeJays SweetFX Shader Suite will also include this improvement.
     
  9. CeeJay.dk

    CeeJay.dk Master Guru

    Messages:
    686
    Likes Received:
    0
    GPU:
    Radeon 6870
    I think so.
    Their driver FXAA has a few tweaks to make it easier on text according to Timothy Lottes blog.
     
  10. TFL Replica

    TFL Replica Master Guru

    Messages:
    381
    Likes Received:
    0
    GPU:
    NVIDIA GTX 970
    Nvidia's way of taking screenshots with driver FXAA is to run the game in windowed mode. For some, that's just unacceptable.
     

  11. meds

    meds Master Guru

    Messages:
    382
    Likes Received:
    0
    GPU:
    .
    I hate FXAA as it makes textures far worse and most games already have lousy textures thanks to the console market not moving to the PS4/X720.
     
  12. yosef019

    yosef019 Ancient Guru

    Messages:
    2,060
    Likes Received:
    0
    GPU:
    MSI 980 4G Gaming @1500
    what beter this or this with shaderfx 0.3beta
     
  13. CeeJay.dk

    CeeJay.dk Master Guru

    Messages:
    686
    Likes Received:
    0
    GPU:
    Radeon 6870
    ShaderFX (to be named SweetFx in the next release) is InjectSMAAmod + additional optional effects.

    So SweetFX is better if you want additional effects.

    I personally play with SMAA and LumaSharpen turned on, because this gives me smooth edges and sharper details.
    I don't normally use tonemapping, technicolor etc that much because it takes time to tweak a games colors to perfection and I spend my time divided between work, gaming and development on SweetFX, but I know that others use these options for manipulating the colors a lot.
     
  14. draegunstrife

    draegunstrife Active Member

    Messages:
    66
    Likes Received:
    0
    GPU:
    EVGA 780 Classified
    hehehe

    Waitin on that Sweetfx

    how far along is it?
     
  15. CeeJay.dk

    CeeJay.dk Master Guru

    Messages:
    686
    Likes Received:
    0
    GPU:
    Radeon 6870
    Well the beta that is out now is working for dx9 - use that.

    The next beta will add the ability to turn SMAA off, though right now I'm puzzled that turning it off doesn't seem to return the performance to the levels that I saw with the separate LumaSharpen mod.

    I'm guessing that the SMAA injector still does all the texture work required for SMAA to work, and there is no way to turn that off.

    I may decide to do another version based on the simpler FXAA injector because it will run faster if you don't want anti-aliasing (or if you want FXAA antialiasing)

    But before that, I think I'll port SweetFX to DX10 and call it SweetFX 1.0 - then rest, and try to improve on the shaders included and perhaps add a few more.

    I want to try a curve function for limiting the strength of lumasharpen based on how strong the contrast the surrounding pixels are and limit the sharpening for pixels that already have a lot of contrast to avoid oversharpening those areas. It should also help reduce halo artifacts.

    I also want to try basing the sharpening on a median of the surrounding pixels rather than a weighted average as I do now, because it should make the sharpening more subtle and should avoid halo artifacts. It might be slow though - doing a median on the values is a lot more work than just taking the average, but I think I can keep it fast enough with a few tricks.

    The vignette needs improvement and I want to study how a real vignette looks on shots from movie and photo cameras, and also make it possible to do more types of vignettes than just an oval darkening border around the image.

    I also want to do dithering, of both the vignette (because it currently adds banding artifacts) and maybe even of the entire image.
     
    Last edited: Aug 16, 2012

  16. CeeJay.dk

    CeeJay.dk Master Guru

    Messages:
    686
    Likes Received:
    0
    GPU:
    Radeon 6870
    I'm still working on porting SweetFX to DX10, but here is SweetFX 0.4 beta for DX9

    SMAA can now be turned off, but as I said before you don't gain as much performance from this as I had hoped because the injector still does most of the work required for SMAA.

    I have reworked the vignette so it's effect is now circular instead of an oval that depended on your screen resolution. Previously if you f.x had a screen with a 16:9 width to height ratio, then the vignette had a 16:9 ratio too. Now it always has a 1:1 ratio so it's circular and not oval.
    Real vignettes from camera lenses are circular because lenses are circular - no matter what format your sensor or film uses. The vignette shader now mimics that.
    I may put oval and other shapes of vignettes back in later with a setting so you can choose which shape you want, but for now it's circular.

    I have also tweaked it to have a steeper fall-off so the middle of the screen stays less affected and then the effect increases faster the nearer it gets to the edge.
    This looks better IMO and has the nice side-effect of making the banding artifacts much less noticeable.

    I made other minor changes to the code of SweetFX but none that should affect how the effects work.

    For example the settings files are now in the same directory as the game exe and the injector dlls, because I found it to be more work to start a game in one directory and then go to another directory and tweak the settings.
    Normally this would not be a problem because most people I think just set the settings they like once per game and then play it, but I constantly make small changes to the code and the settings when I'm developing and so changing between directories all the time was annoying.

    That port to DX10 is going OK, but I can't say when it will be done.
    I have also tried to make the anti-aliased edges stay smoother when I enable lumasharpen, but so far I'm finding it tricky. I have ideas for some different approaches I could try though, so it's not like I'm stuck.
     
    Last edited: Aug 17, 2012
  17. -Tj-

    -Tj- Ancient Guru

    Messages:
    13,831
    Likes Received:
    3
    GPU:
    ZOTAC GX980Ti Amp!Extreme
    I tried new SMAA 2.7
    http://www.iryoku.com/smaa/#downloads

    hooked it up with old smaa injector 1.2 and yes it works, but IQ can be a bit so so.. I tested in monster Hunter frontier benchmark - main menu and its mostly by letters (fuzzy fonts).. default SMAA 1.2 injector showed it normally.. Idk im thinking its luma/green alpha issue.


    Could you CeeJay.Dk check what could be the issue? :) Im not so familiar with those math paragraphs

    http://www.mediafire.com/file/2qptjj22hbac9d5/SMAA_2.7.7z
     
  18. CeeJay.dk

    CeeJay.dk Master Guru

    Messages:
    686
    Likes Received:
    0
    GPU:
    Radeon 6870
    The issue is that you're not using the textures that 2.7 needs, but are using the textures meant for 2.6.

    You can't change the textures though, because they are not external files but are built into the injector dll. So without source code, they cannot be changed (well maybe if you can disassemble the dll - I can't).

    But 2.7 is not the SMAA update you're looking for , move along..
    This is because the update to 2.7 added S2x and 4x support, and neither of these modes can be used with the injector - they require application/game support.

    AFAIK there were no other changes or improvements.
     
  19. Pill Monster

    Pill Monster Banned

    Messages:
    25,234
    Likes Received:
    0
    GPU:
    7950 Vapor-X 1100/1500
    So what should I use if the game doesn't support S2x and 4x (whatever they are). Any ideas?

    I play FO:NV, Shogun II, Mass Effect. Skyrim etc etc
     
  20. -Tj-

    -Tj- Ancient Guru

    Messages:
    13,831
    Likes Received:
    3
    GPU:
    ZOTAC GX980Ti Amp!Extreme
    ^
    Well not with "my combined injection tool", it will act the same as SMAA 1.2 with basic SMAA technique, sometimes it may cause small anomalies - fuzzy text. Although ingame looked fine, in fact it was a bit more anti aliased compared to 1.2 :nerd:

    I tested both in Monster Hunter Frontier 3 benchmark - I was comparing distant mountains aliasing (at the beginning).

    I see, yeah I kinda knew its gonna be something like that.

    lol the moment I merged the files I thought, so where can I activate this 2x, 4x thingy.. *moves along* :grin:


    Thanks for explaining :)
     
    Last edited: Aug 17, 2012

Share This Page