Depth value in vertex / pixel shaders...

I don’t think that the vertex or pixel shaders currently give the developer access to the vertexes’ or pixels’ depth in the depth buffer. Having the depth for both the source and the destination would allow for very nice fog and mist fx.

I have not had the chance to use the shaders yet (not enough cards support the feature), but I really like the focus on them.

I just wanted to bring back an old post that no one responded to.

What do you think?

But of course you have access to vertex depth. After transforming through modelview and projection. Ok, I didn’t read up enough on that, but it wouldn’t surprise me if you could get that value (interpolated) over into the fragment shader. Anything missing?

Is that per fragment in the shader or is this a get the matrix and do your own math sort of thing?