Ambient occlusion for terrain

It’s a cheap technique that uses the heightmap image to calculate the ambient occlusion. It wouldn’t work for non-heightfield geometry. For that, you’d have to use SSAO, which is a bit similar in principle (but much more complex).