If you're thinking "SSAA isn't a shader-based effect!", you're right. Just bear with me.
This is a pack of two shaders that do sub-pixel sampling, effectively implementing SSAA on shader-level. For this to have any effect you must have internal resolution above your window size.
What exactly do they do, anyways? And yes, SSAA isn't a shader-based effect!
Dolphin does no filtering on its output texture, so resolutions above that of your window size won't give you antialiasing and will simply waste resources. To put it another way: only one pixel of rendered image is copied to any visible pixel. It doesn't take much to see that if you have more pixels in rendered image than on display some will end up unused.
To work that around, these shaders take multiple samples from rendered texture inside display pixel, so on resolutions above those of your window you get super-sampled antialiasing!
Why would I want those shaders instead of SSAA by driver?
You probably actually don't! Here are reasons why you should prefer driver-based SSAA over this shader most of the time:
Okay, so which shader should I use if I've decided to use one? 4x or 16x?
I'd recommend either of those setups:
Note for moderators: there is no dedicated forum for shaders, so I'm posting this in generic game modifications. Please move it somewhere else if you see it fit.
This is a pack of two shaders that do sub-pixel sampling, effectively implementing SSAA on shader-level. For this to have any effect you must have internal resolution above your window size.
What exactly do they do, anyways? And yes, SSAA isn't a shader-based effect!
Dolphin does no filtering on its output texture, so resolutions above that of your window size won't give you antialiasing and will simply waste resources. To put it another way: only one pixel of rendered image is copied to any visible pixel. It doesn't take much to see that if you have more pixels in rendered image than on display some will end up unused.
To work that around, these shaders take multiple samples from rendered texture inside display pixel, so on resolutions above those of your window you get super-sampled antialiasing!
Why would I want those shaders instead of SSAA by driver?
You probably actually don't! Here are reasons why you should prefer driver-based SSAA over this shader most of the time:
- Driver SSAA is generally more optimized than rendering at higher resolution.
- It's a complex subject, but reading this section on supersampling will likely help here. In short - drivers sample in different sub-pixel locations, often giving considerably better results compared to simple grid sampling used here.
- Your game have issues with driver's SSAA (but supports high IRs just fine). Since this is a post-processing effect, it won't introduce any graphical issues.
- You're a Citra user (yes, Citra supports Dolphin shaders! You'll want build with this PR merged tho) and Citra lacks SSAA in any capacity.
- You're for some reason unhappy with driver's SSAA or your driver does not support SSAA at all (very, very unlikely).
Okay, so which shader should I use if I've decided to use one? 4x or 16x?
I'd recommend either of those setups:
- 4x if your IR is exactly 2x your window resolution
- 16x otherwise
Note for moderators: there is no dedicated forum for shaders, so I'm posting this in generic game modifications. Please move it somewhere else if you see it fit.