(http://ompldr.org/vY3NzNg/ShadowPass.JPG)
Anyone know how to set the depth function so it always draw anything below the ground?
In DirectX you would do it by setting the dimensions of a clipping plane.
Maybe, this will help: Viewports and Clipping, DirectX 9 (http://msdn.microsoft.com/en-us/library/windows/desktop/bb206341(v=vs.85).aspx)
OpenGL undoubtedly has a similar function.
...Maybe, this will help: Clipping, Culling, and Visibility Testing, OpenGL FAQ (http://www.opengl.org/resources/faq/technical/clipping.htm)