I have an unproject function I've written, which takes in x and y values between -1 and 1, and a z value between 0 and 1 (0 is near plane, 1 is far plane). I create a vector off of this, and multiply it onto Matrix.Invert(ViewMatrix * ProjectionMatrix) to get the world-space coordinates of that screen position at that depth. The problem I'm having is that the given depth values don't result in the right position (at least as I understand it).
Above is a rough sketch of what I'm seeing. The black lines are the frustrum edges, red lines are near and far plane, and green line is the plane drawn at the given z depth. My assumption was that the depth would be linear, with z = 0.5 being halfway between the near and far plane, however the values all sit very close to the near plane until z is real close to 1, at which point it rapidly approaches the far plane. Am I doing my calculations wrong somewhere? Or did I just misunderstand how projections work?