I'd like to insist on how SSAO is pointless in 2D.
Allow me to explain:
SSAO is occlusion, independent from light sources, based on the depth difference between each pixel.
Construct is 2D (mostly). What's the depth difference within a sprite? Zero. Always. What if you want to have a heightmap with heights? well, then the depth difference will be always the same, since the normal never changes..... so, the occlusion will always look the same and you're better off baking it, EVEN IF YOU USE NORMAL MAPPING.
And if you layer one sprite on top of another? well that's why I suggest drop shadow.
I'll try upping the pixel shader version and see if it's enough. I'm bumping into a lot of limits there (registers too)
Wall of text warning
SSAO is a 2D effect using a depth map, it's faster but less accurate than full Ambient Occlusion.
AO is a 3D effect and wont be seen in games for some time. It's faster than global illumination etc. But still too slow to be used in realtime.
Nothing displayed on the screen has depth, doesn't matter what your using, the end result is always going to be 2D. Internally it's 3D. AO is calculated internally and takes into account all the fun light beams and so on and so forth. SSAO doesn't because it can't, it doesn't have access to any of that information. But it does have access to depth maps (I only used height maps as an example of how they look, they're inverted in most programs but the principal is the same). A depth map is the Z-Buffer, it's used to decide what's in front of something and what's behind, and it's very, very useful.
A good use of depth maps is in post production. At that point all your resources are completed and the end results are nothing more than images. Often it's a good idea in post, to do certain effects such as fog, depth of field, or even placing elements in the correct positions in relation to the image. Now if you've just got the single stock image, you're kind of boned unless your elements were against a single color (like green/bluescreen) or using alphas to allow them to be cut out. But even then, to do things properly, a depth map helps. It can then tell the 2D program that a particular effect, lets say fog, should appear heavier where the depth map is pure white, and then falloff as it gets darker. You've just put fog perfectly into an otherwise flat image.
SSAO works the same, and there's a number of plugins available in post production applications which do just that. After Effects and Shake come to mind as two that have them.
-
As for depth within a sprite. Your right, a default sprite in a default 2D world has no depth, being two dimensional.
But what's stopping you from having depth? Consider a parallax effect, 10 layers all scrolling at a different speed. It's 2D, it has no depth. But what if the artwork on each of those layers were given a depth. The artwork in the background layers would be further away than those closer. You couldn't see the difference to look at it. But what if you then applied a DoF shader that takes depth maps into account? You've got visible depth.
Now say you were to create a sprite of a lil guy running, viewed from the side. Shade him however you want, he's just a 2D image. But give him a depth map, where his arm is closer, like an inverted height map. Add an SSAO shader on that, you've got realtime ambient occlusion. You could do this in the same way normal maps are applied at the moment, so effectively doubling everything, or tripling it if you add the normal map required copies too.
Now while this is entirely possible. I'm not saying it's easy. To accurately setup a scene in 2D to make best use of depth maps and SSAO or a DOF shader. You have to plan ahead, either build the scene in pre-rendered 3D, output the required images and depth maps. Or be very good at deciding where things should be in relation to the imagined depth.
So I wouldn't say it's pointless, or impossible. But to set it up without forward planning can break the illusion entirely, and it wouldn't be very useful for everything (retro looking pixely games would have no use for it for example).
Incidentally, you can do Parallax Occlusion Mapping the same way, with a shader coded to change the parallax effect based off of distance and angle from a center point, and using a standard height map for it's input rather than a depth map. Yes that would work just fine in a 2D game as well. But considering you'd be then having four clones of everything, to take into account a depth map for SSAO and DOF (and more accurate motion blur), a normal map, and then a height map for the parallax occlusion effect. You're going to be needing a decent machine just to run it at a sensible framerate.
And now you've got me thinking, how cool a remake of Shadow of the Beast would look, with all the above. Oooooh.