this ao fake is not a spatial calculation but a screen calculation. Since the polygons depth is in a small range it looks good. The depthmap is in view space.

Code:
// Ambient occlusion
float2 Offset = 0;
float fScale = 9.0f;
float fScaleStep = 1.6f;
float fAmbientOcclusion = 0.6f;
int index = ( ( inTex.x + inTex.y ) * vecViewPort.x ) % 4;
for (int i=0; i<4; i++)
{
	for (int ii = 0; ii < 8; ii++)
	{
		Offset.x = coors[index][ii].x * fScale * vecViewPort.z;
		Offset.y = coors[index][ii].y * fScale * vecViewPort.w;
		Offset.xy += fSunDir.xy * i * 0.002f;
		float fNewDepth = tex2Dlod ( DepthSampler, float4(inTex.xy+Offset.xy,0,0) ).r;
		fAmbientOcclusion += fDepth < fNewDepth ? 0.015625f : -0.015625f;
	}
	fScale *= fScaleStep;
}



I blur the result with a 5x5 cubic gaussian blur in two stages