How to get 3D points from Screen?

I want to get 3D points in the world from 2D points in screen.

If I make a screenshot with resolution 500x500, I want to get every 3D point vector from each pixel (500x500 points)

I’m sure it is kinda rendering process, but I have no way to figure out.

Please help.