double linearizeDepth(double nearz,double farz,double depth) { depth = 2.0 * depth - 1.0; return (2.0 * nearz) / (farz + nearz - depth * (farz - nearz)); }
double linearizeDepth(double nearz,double farz,double depth) { depth = 2.0 * depth - 1.0; return (2.0 * nearz) / (farz + nearz - depth * (farz - nearz)); }