Solution 2:
It seems there is a limitation of the range of nearClip and farClip. In my case, 0.01 ~ 100000 is too large, so adjust them will work. I’ve tested on 100 ~ 100000, it works fine. See http://jsbin.com/husoxas/25/edit?js,output.
Ah of course, the depth buffer only has so much accuracy… You must have been blowing the limits of it! Yeah the units are based on the difference between the two. If you think about it there aren’t many times when you can see from between 100m and 1000km!