A quick question: there is a well-known approach to store 3d point in space in a texture as a distance between camera and an object (deferred rendering). But it implies that the object lies on a ray, cast from the camera towards that object in such and such section (UVs) of the texture. Is there any way to store a RANDOM 3d point in space in a texture with a single (mb 16-bit) depth value or less than 3 values?
Depth maps get away with using only a single coordinate because the other two are implicit in the location of the texel within the map (UV).
If you need to scatter each texel randomly in 3D space, then you'll need to encode all three degrees of freedom into the texel value.
If you don't have 3 channels to spare, you can quantize your positions and pack them into a smaller number of channels (as low as one channel encoding all three axes).
The optimal way to do this will depend heavily on your application. For instance, if your points are clumped it may work well to express them in polar coordinates. If one axis has greater range/variability than others, you may want to devote more bits to it...
As one example, if I have a 16-bit field to work with, I can encode x into the low 5 bits, y into the middle 5, and z into the top 6 bits. This only gives 32 unique positions along the x/y axes, and 64 on the z.
Texture values encoded this way will not interpolate correctly with bi/trilinear or anisotropic filtering, so ensure you're using point sampling and doing any interpolation you need manually in the shader.
Basically what you're trying to do is called unprojecting. If you unproject a 2D point (calculated from an inverse projection matrix) you will get a ray. If you store the distance from the camera in the 16bit depth values you can quite accurately reconstruct the 3D world point.
Please see this question on StackOverflow http://stackoverflow.com/questions/3528114/whats-wrong-with-my-project-and-unproject-functions (Note that it really depends on the framework you are using if you need to transpose the matrix or not).
Another good resource is: http://myweb.lmu.edu/dondi/share/cg/unproject-explained.pdf
(Normally I would reproduce it here so that it would be available as long as this question exists but I'm not 100% sure if the author of the PDF would allow it)