MCPcopy Create free account
hub / github.com/assaultcube/AC / depthcorrect

Function depthcorrect

source/src/rendergl.cpp:993–996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

991// stupid function to cater to stupid ATI linux drivers that return incorrect depth values
992
993float 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

Callers 1

readdepthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected