Dolphin, the GameCube and Wii emulator - Forums

Full Version: [Tip]Anti-aliasing and Filtering with Little-No Performance Hit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
This is a tip for if you have a decent computer already and want to get good AA/AF without a huge performance hit. This is NOT for machines that are low end. Posting here since apparently this isn't warranted on the wiki.

Tested on: Both DX11 supporting AMD/NVidia cards, Dolphin 4.0.1
Requires: Discrete Graphics Card, game that can work with DirectX9 or DirectX11, so Windows only.
"Little to no performance hit" - Depending on your machine, and if you are running the game with a frame cap. I'm guessing the speed up is because the graphics card is taking care of the AA/AF, instead of through the emulation wrapper. There would be an impact if your graphics card can't handle the game without AA.
How to:
1) Set AA/AF settings to None/1x in Dolphin. Backend must be set to DX9 or DX11
2) Open up your graphics card settings program (NVidia control panel and AMD CCC). If you don't see the option, update your drivers.
3) Set your graphics card to override application settings, and set AA/AF to what you want.
4) CLOSE Dolphin completely, and restart (Graphics settings change doesn't take effect until the program is completely closed)
5) You now have high AA/AF settings with little-no performance hit.

*Remember: If you want to use OpenGL again, you will need to turn off application override in the future.

Performance comparisons for my desktop computer (specs are from the generation released 4 year ago) as a reference/example:
Xenoblade Chronicles (NTSC), 30fps cap, numbers are lowest (lag spike)/average (usual)
FPS with no AA in Dolphin: 25/30
FPS with no AA in Dolphin, Graphics Card override to 24xSSAA: 24/30
FPS with no AA in Dolphin, Graphics Card override to 12xSSAA: 25/30
FPS with 2x AA in Dolphin: ~18/20
FPS with 8xAA in Dolphin: ~2/5
FPS with 4xSSAA in Dolphin: ~2/5.
cool man, didn't know this, thanks for posting Smile
+1
So basically you're just telling people to force AA through their drivers instead of using dolphins settings. This is really basic knowledge that most PC gamers probably already know. People have been doing this for years but it's not too common because it produces minimal performance gains in every instance that I've seen and can cause issues with some games. On top of that often times it flat out doesn't work depending on the type of AA that you're trying to force and your settings within dolphin. Your comparison at the end of your post does not include screenshots to verify that the AA is working correctly and producing equivalent quality, does not list the type of AA backend or other settings used in dolphin, and lists edge only sample numbers for CCC which is a bit misleading. My best guess is that you're using MSAA in dolphin and edge detect SSAA in CCC. I find it hard to believe you're getting an 85% drop in performance with 4xSSAA in dolphin. In fact that's mathematically impossible unless you're running out of video ram which wouldn't happen on that card unless you're running at an absurdly high IR. Which IR are these comparisons being done at? A 20% drop in framerate from 8xSSAA with edge detect in CCC is really hard to swallow unless either your IR is really low or the SSAA isn't working propery.

You definitely should not be forcing AF through the drivers when dolphins implementation has zero performance hit on a modern graphics card. There is no point in running the risk of generating artifacts.

Oh and many driver AA do work with openGL just so you know. Different types of AA work with different backends. On top of that nvidia and AMD have different implementations which causes differences in which combinations work and which ones don't between them. And some AA methods that don't work normally can be forced to work with correct compatibility bits set through a driver override program. These have all been discussed extensively in other threads if you use the forums search function. They wouldn't be discussed in the wiki because that's not what the wiki is for. Anything regarding external programs or image quality enhancements isn't going to be found on the wiki.

Your post seems to imply that every driver AA method works with both d3d9 and d3d11 when the vast majority do not. For example you cannot get driver MSAA working with either nvidia or AMD cards using dolphins d3d9 backend.

limith Wrote:2) Open up your graphics card settings program (NVidia control panel and AMD CCC). If you don't see the option, update your drivers.

In order for you to not have a driver control panel at all your drivers would have to be more than 12 years out of date with either company. And if that were the case you wouldn't be able to run dolphin anyways.

@CryZENx

How could you not know that AA can be forced through drivers when you've done forced downsampling through drivers before? Which is far more complicated.
(11-30-2013, 10:14 AM)NaturalViolence Wrote: [ -> ]So basically you're just telling people to force AA through their drivers instead of using dolphins settings. This is really basic knowledge that most PC gamers probably already know. People have been doing this for years but it's not too common because it produces minimal performance gains in every instance that I've seen and can cause issues with some games. On top of that often times it flat out doesn't work depending on the type of AA that you're trying to force and your settings within dolphin. Your comparison at the end of your post does not include screenshots to verify that the AA is working correctly and producing equivalent quality, does not list the type of AA backend or other settings used in dolphin, and lists edge only sample numbers for CCC which is a bit misleading. My best guess is that you're using MSAA in dolphin and edge detect SSAA in CCC. I find it hard to believe you're getting an 85% drop in performance with 4xSSAA in dolphin. In fact that's mathematically impossible unless you're running out of video ram which wouldn't happen on that card unless you're running at an absurdly high IR. Which IR are these comparisons being done at? A 20% drop in framerate from 8xSSAA with edge detect in CCC is really hard to swallow unless either your IR is really low or the SSAA isn't working propery.

You definitely should not be forcing AF through the drivers when dolphins implementation has zero performance hit on a modern graphics card. There is no point in running the risk of generating artifacts.

Oh and many driver AA do work with openGL just so you know. Different types of AA work with different backends. On top of that nvidia and AMD have different implementations which causes differences in which combinations work and which ones don't between them. And some AA methods that don't work normally can be forced to work with correct compatibility bits set through a driver override program. These have all been discussed extensively in other threads if you use the forums search function. They wouldn't be discussed in the wiki because that's not what the wiki is for. Anything regarding external programs or image quality enhancements isn't going to be found on the wiki.

Your post seems to imply that every driver AA method works with both d3d9 and d3d11 when the vast majority do not. For example you cannot get driver MSAA working with either nvidia or AMD cards using dolphins d3d9 backend.

limith Wrote:2) Open up your graphics card settings program (NVidia control panel and AMD CCC). If you don't see the option, update your drivers.

In order for you to not have a driver control panel at all your drivers would have to be more than 12 years out of date with either company. And if that were the case you wouldn't be able to run dolphin anyways.

@CryZENx

How could you not know that AA can be forced through drivers when you've done forced downsampling through drivers before? Which is far more complicated.
I find dismissive attitude like this very disheartening.

"This is really basic knowledge that most PC gamers probably already
know. People have been doing this for years but it's not too common
because it produces minimal performance gains in every instance that
I've seen and can cause issues with some games."
Not everyone knows this. I'm just trying to help others.

"On top of that often times it flat out doesn't work depending on the
type of AA that you're trying to force and your settings within dolphin." "You definitely should not be forcing AF through the drivers when
dolphins implementation has zero performance hit on a modern graphics
card. There is no point in running the risk of generating artifacts." "I find it hard to believe you're getting an 85% drop in performance with
4xSSAA in dolphin. In fact that's mathematically impossible unless
you're running out of video ram which wouldn't happen on that card
unless you're running at an absurdly high IR. Which IR are these
comparisons being done at? A 20% drop in framerate from 8xSSAA with edge
detect in CCC is really hard to swallow unless either your IR is really
low or the SSAA isn't working propery."
Those weren't numbers made up from thin air, I'll post screenshots since you seem so doubtful (though everything will be higher since I overclocked my CPU now, those numbers were from stock i7 before my new cooler arrived to let me overclock)

"does not list the type of AA backend or other settings used in dolphin. My best guess is that you're using MSAA in dolphin and edge detect SSAA in CCC" I explicitly said to use DirectX9 or DirectX11, there's no difference in numbers for me overall. I also explicitly stated what each number's AA method was. 8x = 8x plain. 4xSSAA = 4x SSAA. Did you even read it? No where does it list MSAA.

"Oh and many driver AA do work with openGL just so you know." Again, I explicitly said to use DirectX9 or DirectX11, I know it doesn't work with OpenGL, it causes a black screen for me, I even said in the post above to disable override if you want to use OpenGL again.

"Your post seems to imply that every driver AA method works with both d3d9 and d3d11 when the vast majority do not. For example you cannot get driver MSAA working with either nvidia or AMD cards using dolphins d3d9 backend. " I'm not comparing MSAA. It's not even an option under DX9 or DX11 dropbox for me in normal Dolphin anyway, only an option for the OpenGL backend.
__________________
Edit: https://www.mediafire.com/folder/kw4im47...omparisons

(Note this is running at 4.7GhZ, not 3.4 Ghz the previous numbers were taken from, I don't want to mess with my overclock numbers to re-create screens)
OpenGL 1x: 30fps
OpenGL 4x: 15 fps
OpenGL 4xSSAA: 15fps
OpenGL 8x: 8fps
DX9 1x: 30/31fps
DX9 24xSSAA (Override): 30/31fps
DX9 4xSSAA: 16-20fps
DX9 9xSSAA: <9fps (maximum standing still)
DX11 not tested due to incompatibility with HD Textures pack.

I have no idea if the override makes any visual difference since I can't tell any difference between DX9 1x and DX9 9xSSAA, but I do know it does attempt to override since OpenGL will fail (black screen) with override on. As the numbers and screenshots clearly show, Dolphin's implementation DOES have an impact on performance.
What the hell are you talking about Op? You can't have SSAA without performance hit, it's literally impossible. Just in case you didn't know 4XSSAA simply just mean 4x the resolution ( 1x internal resolution + 4xSSAA = 4x internal resolution + no AA). The reason why you're not seeing any performance difference is simply because your AA is not working, you need to use something like Nvidia inspector to force AA in Dolphin from drivers.
(12-01-2013, 02:27 AM)SRO07 Wrote: [ -> ]What the hell are you talking about Op? You can't have SSAA without performance hit, it's literally impossible. Just in case you didn't know 4XSSAA simply just mean 4x the resolution ( 1x internal resolution + 4xSSAA = 4x internal resolution + no AA).
4xSSAA is what it lists in Dolphin. So it down samples. I'm comparing 4xSSAA in Dolphin to 12/24xSSAA in my graphics card override and I'm giving you the fps I'm getting.
If you want to know what settings I had, you can look at the images I uploaded.
http://www.mediafire.com/view/kw4im47chi...s4dnyb3uom

And yes I can without a performance hit, if the implementation of Anti-Aliasing in Dolphin poorly uses the graphics card. If I set AA to None in Dolphin, my graphics card says activity is ~0 (very low) at the main menu (the grass field). If I set AA to 4xSSAA in Dolphin, my graphics card jumps up to 99% usage at the main menu and I get lag, hence the drop in fps. If I set my graphics card to override 24xSSAA game settings and I set the Dolphin AA to None, my graphics card is at 35% usage at the main menu*. In other words, the override is more efficient and my graphics card is doing something. Hence I get "no performance hit" because I get 24xSSAA without the graphics card bottleneck. *Jumps to 59% once the background starts to change, numbers are when the game just starts. No AA in Dolphin/Graphics card uses ~30% gpu potential once the background starts to change.
Quote:The reason why you're not seeing any performance difference is simply because your AA is not working, you need to use something like Nvidia inspector to force AA in Dolphin from drivers.
So explain to me why when I set override to true, OpenGL backend will fail to render if my graphics card is doing nothing to Dolphin, or why my graphics card is actually doing anything (35% usage).
@SR007 - 4xSSAA actually generates an image with 4 times as many pixels as the original before downscaling, that is to say it generates an image with 2x the width and 2x the height first. Essentially, at 1x IR, 4xSSAA has to generate a 2x IR image before downscaling; at 2x IR it generates a 4x IR image before downscaling. 9xSSAA generates an image with 9 times as many pixels as the original, as in an image with 3x the width and 3x the height.

tl;dr multiply the current IR by the square of the SSAA method (4x, 9x) to find the resolution of the image SSAA uses before downscaling.

@limith - Haven't had a look at your screenshots, but your claims are hard to believe. Not saying they aren't true, just extraordinary.
(12-01-2013, 03:41 AM)Shonumi Wrote: [ -> ]@SR007 - 4xSSAA actually generates an image with 4 times as many pixels as the original before downscaling, that is to say it generates an image with 2x the width and 2x the height first. Essentially, at 1x IR, 4xSSAA has to generate a 2x IR image before downscaling; at 2x IR it generates a 4x IR image before downscaling. 9xSSAA generates an image with 9 times as many pixels as the original, as in an image with 3x the width and 3x the height.

tl;dr multiply the current IR by the square of the SSAA method (4x, 9x) to find the resolution of the image SSAA uses before downscaling.

@limith - Haven't had a look at your screenshots, but your claims are hard to believe. Not saying they aren't true, just extraordinary.
I think after looking at my GPU usage numbers that it's probably due to Dolphin not being optimized for my AMD card. Although one good thing is that it made me turn on manual fan control since I just realized the auto was letting the GPU go to dangerous levels for the sake of maintaining a quiet fan. >.>
The driver-forced AA isn't working, from looking at the screens. It's not working in the screens you provided at least. You should have taken the screenshots at a save point/state, so you could load up the game and take the shots in the same angle/spot btw.

Placebo effect I'm afraid, unfortunately. When something is to good to be true...

Physics is op.
(12-01-2013, 04:54 AM)Asmodean Wrote: [ -> ]The driver-forced AA isn't working, from looking at the screens. It's not working in the screens you provided at least. You should have taken the screenshots at a save point/state, so you could load up the game and take the shots in the same angle/spot btw.

Placebo effect I'm afraid, unfortunately. When something is to good to be true...

Physics is op.
To be honest I can't notice any difference between the 9xSSAA Dolphin screenshot and the No AA at all Dolphin Screenshot (with no override). Curious how you tell the difference imho. What would be a good location/scene for comparison? Water?

These 3 were roughly the same spot/angle, slight color difference due to weather unfortunately.
http://www.mediafire.com/view/kw4im47chi...m10csanta6
http://www.mediafire.com/view/kw4im47chi...x7b2s5ijxp
http://www.mediafire.com/view/kw4im47chi...a3s6xrulcu

That said, it's possible the override isn't working.
Pages: 1 2