PC Gaming 1337 Enforcer
After seeing the response to this post of mine, I have decided to make this thread.
NVIDIA Inspector is a tool for editing driver settings on NVIDIA GPUs (as well as monitoring and overclocking, like RivaTuner and its derivatives). Like an expanded version of that section of NVIDIA Control Panel. Many people aren't aware that Inspector has a plethora of options for tweaking image quality. The tweaks I'm going over in this thread are forcing ambient occlusion and supersampling into games.
Without ambient occlusion, games look so much less realistic as light no longer seems to have much of an effect on the environment. And aliasing? It can make an otherwise great looking game look horrible. Most games today are heavily aliased even with their anti-aliasing setting maxed out, because they only have highly ineffective, overly simple post-process AA such as MLAA, FXAA, or SMAA. They attempt to blur out aliased edges after the scene is already fully rendered and fully aliased.
These games, even at 2560 x 1440 and often even at 4k, are so aliased that all objects will appear like distorted raw polygons or blobs with moving, white jaggy edges. Some of the biggest offenders include The Witcher 3, Assassin's Creed: Unity, Crysis 3, Mass Effect series, S.T.A.L.K.E.R. Shadow of Chernobyl, and numerous others.
Supersampling is the ultimate anti-aliasing method, and also the most demanding. You see, if we could play games at a large enough resolution (5k or higher from my experience) then aliasing wouldn't be an issue. This is the principle behind downsampling, supersampling's infant brother; simulate a larger resolution by rendering the image at a larger resolution and then scaling it back down with a rescaling filter (Lanczos being the best I know of, used by GeDoSaTo).
But supersampling doesn't just use a simple rescaling filters. The filters it applies are far more complex and effective at eliminating aliasing, and it gets rid of all kinds of aliasing whether it's geometry, shader, aliasing on transparent textures, temporal, you name it. Whereas MSAA is only good for removing aliasing on geometry, MLAA/SMAA/FXAA targets only shader aliasing but they're good for nothing, TAA is a good all around method but still not on supersampling's level (though it's not demanding at all so there is no good reason for MLAA/SMAA/FXAA to exist anymore).
Unfortunately these tweaks only work in pre-DX10 games, the ambient occlusion probably only working in DX9 (and maybe a few OpenGL titles). There are very few exceptions; it is possible to force ambient occlusion into Metro Redux using this method (a DX11 game), and it does improve image quality ever so slightly. Nonetheless, these tweaks are a primary reason as to why I stick with NVIDIA graphics cards; many of the best games ever made are DX9, and I like to make them look as good as possible. Plus I hate aliasing more than almost anything else.
Why don't these tweaks work in newer games? I suppose NVIDIA decided that compatibility isn't needed. Modern games always have their own ambient occlusion implementation, although they could really use the supersampling because modern games are more aliased than ever before. But then again, supersampling is very hard to run.
Speaking of performance, I can't speak for the performance impact of forcing ambient occlusion. The last time I felt an actual impact was in Skyrim using a GTX 680. With my current PC (see my system specs) I obviously can't really measure a difference.
As for supersampling, see this quote:
SourceIn the situation where a game is bound by pixel shaders (usually the case in modern games) assuming no external bottlenecks the framerate after SSAA is applied will be 1/n of the framerate without SSAA where n is the number of samples. In other words 4xSSAA would give you 1/4th the performance of no SSAA, or a 75% drop in performance to put it another way.
So 2x supersampling will give you a 50% performance penalty, 4x will give you a 75% drop, 8x will give you an 87.5% drop.
1. Download NVIDIA Inspector from Guru3D. Link.
2. You must run "nvidiaProfileInspector.exe" to perform these tweaks. Not the regular Inspector application, which is the monitoring and overclocking tool.
3. Upon launching nvidiaProfileInspector, you are greeted with the global driver profile. It applies to all 3D applications, but anything you change in individual profiles will overwrite the global setting.
You should set some basic parameters in the global profile.
- People with decent modern PCs should set texture filtering to High Quality, and just enable High Quality ambient occlusion.
- Set your desired Power management mode (I prefer "Prefer Maximum Performance" so that my GPU never downclocks when it shouldn't).
- Disable Shadercache since it might cause stuttering in some games.
- Set "Texture filtering - Negative LOD bias" to Clamp, and leave LOD bias at 0. This will usually deliver the best image quality all things considered as you won't get shimmering. I only recommend using Allow and a negative value when using supersampling, which we'll go over later.
- Set Preferred Refresh Rate to Highest Available. This may have to be changed in very specific scenarios, such as if you want to use a lower than maximum refresh rate in certain games (e.g. using 120 Hz ULMB in Source games on my 144 Hz monitor). In which case, set the appropriate setting for that game's driver profile.
5. Since we're focusing on forcing ambient occlusion and supersampling into games, you need to use compatibility bits (save for DX8 games which don't need them). See the red box labeled 1. in the image below. Notice there is a separate field for anti-aliasing compatibility in DX1x games (DX10, DX11, DX12). Funny they put this because to my knowledge, there are no bits for any DX10/DX11/DX12 game.
To find proper compatibility bits, go here for anti-aliasing bits and here for ambient occlusion bits. If that Guru3D anti-aliasing thread says to either use or do not use "AA fix" then do as they say. If they say nothing (which is usually the case), do not use AA fix.
So let me go over the labeled red boxes in that image above. The numbers in the list below correspond to the image above.
- As I said earlier, these are the compatibility bits. Get them from those Guru3D threads, and if a game isn't listed find out what engine it uses and see if there are any bits for other games on that engine.
- Antialiasing - Behavior Flags - Set this to None every time, so that it doesn't screw with your AA.
- These are the actual anti-aliasing settings. Antialiasing - Mode allows for application-controlled (doesn't make any changes), Enhance the application setting (enhances the game's current AA), and Override the application setting (bypassing the game's AA and forcing its own). You can force or enhance multisampling (full screen or just transparent), sparse grid supersampling aka SGSSAA (full screen or just transparent), ordered grid supersampling aka OGSSAA (full screen or just transparent), and hybridsampling aka HSAA (full screen only). Read all about these different AA forms here, under "Nvidia" but do read the others too since it's good knowledge to have. Personally, I find that SGSSAA typically looks the best, when there is a bit that allows for all three. The image above showcases 2x full screen SGSSAA (aka FSSGSSAA). I rarely use Enhance, only using it if the game for some reason supports Enhance but not Override (e.g. KOTOR).
- "Texture filtering - Driver Controlled LOD Bias" should be set to On in the default profile, don't touch this. The other three settings in this box control your LOD or Level Of Detail settings. Ideal settings here depend on what kind of AA you're forcing. Unless it's supersampling or hybridsampling, leave it at Clamp and 0. If hybridsampling, set it to Allow and 0 since hybridsampling has auto LOD adjustment.
- Ambient occlusion settings. Always leave it as Enabled unless you can't run it at all, though the other setting does have three performance options: Performance, Quality, and High Quality (and Off, seems redundant given the other setting but whatever).
Here are some examples of settings you may find yourself using. The last image above shows me forcing 2x SGSSAA into Half-Life 2: Episode Two (and any Source mod built on Source SDK Base 2007). Below is another example of SGSSAA, this time 4x:
Notice the pattern? Below are the steps to apply full screen SGSSAA:
- Make sure AA Behavior Flags are set to None.
- Set Antialiasing - Mode to Override.
- Antialiasing - Setting must be set to either 2x multisampling, 4x multisampling, or 8xQ multisampling. I suppose 8x CSAA and 16xQ might work with 4x and 8x sparse grid supersampling respectively. The reason for this rule is, sparse grid supersampling gets its sample coordinates from the MSAA samples, thus they have to match numerically.
- Disable transparency multisampling.
- Set transparency supersampling to sparse grid and however many MSAA samples you chose in step #3.
- Set "Allow Negative LOD Bias" to Allow.
- Set the LOD Bias (the correct one; DX means DirectX, OGL means OpenGL) to -0.5 if using 2x SGSSAA, -1.0 if using 4x SGSSAA, or -1.5 if using 8x SGSSAA.
- Don't forget to hit apply!
Now let's look at OGSSAA in the image below.
There are only a few differences on how to set this up over SGSSAA. The first being, multisampling is never used for the AA setting. Second, sparse grid is obviously not used for transparency supersampling; instead the regular supersampling is used (which is ordered grid). The LOD works the same way, I'll just quote that blog again here:
Expanding on this, if using 1x2 or 2x1 supersampling, transparency supersampling should be set to 2x (just do the math, 2 * 1 = 2 and 1 * 2 = 2 and the goal here is to apply full screen supersampling). 2x2 supersampling should use 4x transparency supersampling. Thus, you can't apply full screen 8x or 9x OGSSAA, only 2x, 4x, and 16x!Set negative lod to allow and set the lod bias as follows:
1x2 OGSSAA (2 samples): -0.5
2x1 OGSSAA (2 samples): -0.5
2xSGSSAA (2 samples): -0.5
2x2 OGSSAA (4 samples): -1.0
4xSGSSAA (4 samples): -1.0
8xSGSSAA (8 samples): -1.5
3x3 OGSSAA (9 samples): -1.58 (or as close as you can get)
4x4 OGSSAA (16 samples): -2.0
The formula for determining the correct lod bias is "y = -0.5 * log, base 2, of " where n is the number of samples and y is the correct lod bias. Of course since some of you may have forgotten how to use logarithms I went ahead and typed out the correct values for each SSAA mode above.
It is of course possible to run into a scenario where your PC can handle 1x2 or 2x1 OGSSAA + 4x transparency supersampling. It's not going to look worse than 2x FSOGSSAA (which is 1x2 or 2x1 + 2x transparency supersampling) though it'll run much worse. In this case you might be better off running 2x2 OGSSAA and 2x transparency supersampling. Either way you are applying a different amount of supersampling to transparent edges compared to the rest of the image.
What is the difference between 1x2 and 2x1 you ask? 1x2 = 1 horizontal sample and 2 vertical, 2x1 is the opposite. Neither one is perfect, if 2x FSSGSSAA works instead it's bound to look better.
To enable HSAA, which is OGSSAA + MSAA + auto LOD adjustment, follow these steps:
- Set AA behavior flags to None.
- Set AA mode to Override.
- Set Antialiasing - Setting to one of the settings that ends in "xS". This indicates HSAA.
- Disable transparency multisampling.
- Set transparency supersampling to one of the regular supersampling options, matching the OGSSAA samples of your chosen "xS" option in step 3.
- Set LOD bias to 0.
- Set Allow Negative LOD Bias to Allow. Remember, HSAA has auto LOD adjustment.
The image below shows 4x HSAA. 32xS = 2x2 OGSSAA (4x) + 8x MSAA, so 4x transparency supersampling is used.
Screenshot Comparisons (open them in new tab, then magnify by clicking on it)
Now let's look at some screenshot comparisons! Details provided below for each game comparison. For every before/after comparison, before shows the game with no driver tweaks. Remember, the differences are even more obvious in gameplay since aliasing is more obvious in moving images (the jaggies appear to move).
Unreal Engine 3 games
Unreal Tournament 3 (2007). Before = no driver tweaks, After = 4x SGSSAA and high quality ambient occlusion using the UT3 AO bits. Interestingly enough this is the one game I can detect an FPS drop caused by high quality HBAO+. Without it, and even with 4x SGSSAA, I get 120 FPS with V-Sync. With high quality HBAO+ my frame rate is dropped to 100-110. Be sure to open the images in a new tab and magnify them by clicking on them.
Mass Effect (2007): Before = no driver tweaks, After = 2x SGSSAA and high quality ambient occlusion using Mass Effect AO bits. The changes are even more significant in practice due to the fact that the aliased edges move a lot.
As you can see even 2x SGSSAA isn't enough to get rid of all the aliasing, although it gets rid of a lot and prevents the edges from glowing white and moving like they do without it.
Mass Effect 2 (2010): Before = no driver tweaks, After = 4x SGSSAA and high quality ambient occlusion using Mass Effect AO bits.
Dishonored (2012): Before = no driver tweaks and in-game FXAA, After = 2x SGSSAA and high quality ambient occlusion using Hawken AO bits. I'm actually shocked that the difference isn't as obvious in the screenshots, although the aliasing difference is still major to me just in the screenshots.
Source Engine games/Source mods.
Underhell: Before = no driver tweaks and in-game 8x MSAA, After = 2x SGSSAA and high quality ambient occlusion using HL2 E2 AO bits.
No More Room in Hell: Before = no driver tweaks and in-game 8x MSAA, After = 2x SGSSAA and high quality ambient occlusion using HL2 E2 AO bits.
id Tech Games
Call of Duty: Before = no driver tweaks, After = 4x SGSSAA with 16x AF and forced ambient occlusion using Wolfenstein AO bits. The AO doesn't seem to work, but the other two things make a massive difference.
Dragon Age: Origins: Before = no AA, since in-game AA doesn't work with the SweetFX I'm using. After = 4x SGSSAA.
Other than performance, the possible downside to forcing supersampling is blur, which is caused by conflicting post-process shaders. This blur can be countered with post-sharpening injected by something like ReShade, SweetFX, or GeDoSaTo. Alternatively, it can be countered by using more than 2x supersampling. 4x and 8x will either blur a lot less or not have visible added blur at all because the blur is offset by the extra samples (rendering at 4x or 8x native resolution).
When forcing ambient occlusion, if you're using compatibility bits not listed for a game on that Guru3D thread above, you may notice flickering (ambient occlusion turning on and off). Also, in some engines like UE3, forced ambient occlusion will appear to shine through fog and volumetric effects.