Depth Pass to Pixel Projection (AN)
Method:

The idea is to first compute the distance from the camera for all vertices of a polygon 2) then find the vertex that minimum distance from the camera 3) then project the remaining vertices of the polygon accordingly.


Follow the Method for Depth Map with AN+EN to get this node-tree,


We compute the distance from the camera for all vertices of each polygon then reproject according to the vertex that has minimum distance from the camera. This will give a new polygon(s) that is perpendicular to the camera view,


Now, we have vertices for separated polygons and we can get polygon-indices and edge-indices with the help of the Separate Polygons node,




Blend File:



To add spheres at the center of newly project polygons, first, we have to compute the scale according to the polygon size like so,


Then use Extract Polygon Transforms node to get the polygon transformation and use the Step 4 scale for matrices to instance spheres at the polygons' center,




Blend File: