| 991 | // stupid function to cater to stupid ATI linux drivers that return incorrect depth values |
| 992 | |
| 993 | float depthcorrect(float d) |
| 994 | { |
| 995 | return (d<=1/256.0f) ? d*256 : d; |
| 996 | } |
| 997 | |
| 998 | // find out the 3d target of the crosshair in the world easily and very accurately. |
| 999 | // sadly many very old cards and drivers appear to fuck up on glReadPixels() and give false |