keijiro/DepthInverseProjection

Does not account for near plane

Closed this issue · 3 comments

It seems this:

float3 vposPers = input.ray * Linear01Depth(z);

Does not account for the near clip plane, does it? That is, consider getting a depth value of zero -- that position should be at the near clip plane, but wont this math put it directly at the camera?

It does. Linear01Depth is designed as it returns zero at the eye position; So it returns near/far at the near clip plane.

I'm closing this issue. Please feel free to reopen for further questions.

Ah, I didn't realize, thanks!