Depth Pass to Pixel Projection (AN) Additional question to 3DSinghVFX's answer

To illustrate question - imagine this white/pink rectangles as rendered image of 6 x 3 pixels.
Here seen by Camera.

Animation Node tree (mentioned in the answer) generates a compact surface.

My question is ...
How can be pixels (reconstructed in 3D space from Depth Pass or Point Position Map as points) represented by unconnected quads orientated to Camera. To be seen by Camera as regular squares without gaps so final result is identical to original image.
In theory, since those faces aka pixels are oriented to camera they are still squares and from mentioned answer also grid is nicely even to a camera view ... So the only question here is probably how calculate size according to distance from camera.

Sidenote: Surface generated by mentioned answer is awesome, downside of that menthod are connections between front-back pixels that are empty space in real. Since there is not a way to store this kind of data in EXR, it seems to be better use pixels as separated to get similar result.

I'm also interested in version with coloured Points (spheres) scaled accordingly to Camera distance, to be seen by camera as same size.


I would appreciate if you can use the same EXR source data from original Q.
Thank you for help.
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: