Fixed the depth buffer. For some odd reason the texture unit 3 gives an all black texture, while binding the depth buffer to any other texture unit, in our case the unit 4, gives the correct result.