Image coordinate and Z buff to World Space Position

I export the depth from Unity (GetComponent().depthTextureMode = DepthTextureMode.Depth), in the range [0,1], to exploit it in C language.
After rendering, I need to find the World Space Position of a 2D image point located at (u,v) in my texture. (It seams to be equivalent to the function ComputeWorldSpacePosition of the SRP). My understanding is that, I have to :
1/ express u, v and the depth from Unity in the range [-1,+1].
2/ transform this point by the Inverse projection matrix.
3/ transform the point by the camera to projection matrix.
Is it that simple ?

Thanks for your help.

Is it that simple ?
Yes, pretty much ^^.

  1. ViewPort space (0 to 1) to NDC space (-1 to 1 ).
  2. Unproject by the inverse of the projection matrix. (make sure to use MultiplyPoint as it does perform the homogeneous divide by w automatically).
  3. Use the cameraToWorldMatrix of the camera to transform from camera space to worldspace.

This should do it.