深度缓存ZBuffer线性化

double linearizeDepth(double nearz,double farz,double depth)
{
depth = 2.0 * depth - 1.0;
return (2.0 * nearz) / (farz + nearz - depth * (farz - nearz));
}
原文地址:https://www.cnblogs.com/coolbear/p/8349890.html