Shadowmap in GLSL shader

This question arises when implementing world-coordinate based texturing on a mini-golf course.

The texturing part is straight forward (thus, omit the code)
i. use modelMatrix * vec4 (position, 1) to get the world coordinate,
ii. pass it as varying
iii. use it in texture2D in fragment shader

I have no good idea to implement the shadow for the golf ball. As the ground may be elevated, the faked (projected) shadow is not an option. shadowmap seems to be the only clean way to do it.

Any examples/hints I can follow?