Original Post
Hi, I have a projection matrix that is w, 0, 0, 0, 0, h, 0, 0, 0, 0, (f + n) / (f - n), -(2 * f* n) / (f - n), 0, 0, 1, 0); This matrix is a OpenGL projection matrix. I would like to map the values that I can read from the depth buffer into the near / far plane range of the view frustum in camera space. This is useful for camera based effects like Depth of Field. Many websites suggest a solution like this: -f * n /(z * (f-n) -f) where z is the depth buffer value and f and n the far and near plane. Any references where I can read up on this?