Just because I need one, and also because the AO node in Blender is a little too light, I've made today an Ambient Occlusion Shader with OSL.
It works exactely like a standard Ambient Occlusion, as you could find it in many software.
It works with with colors as well as with Closure.
if you connect use just the ' ColorIn ' or just the ' closureIn ' inputs and connect nothing to 'ColorHit' or 'closureHit'. Then Occlusion will be black.
AO Angle is in RADIANS, 1.0 = 180° AO search.
Maxdistance limit distance of occluding objects.
If you want to not have a distance limit, 0.0 is not infinity. You'll have to enter a very big distance.
This AO shaders needs polygons to be correctely oriented.
You can download it here : OSL Ambient Occlusion