Getting coordinates of edges in a rendered scene

I’m trying to learn Three and 3D graphics in general by trying to port this effect from blender to Three but I haven’t been able to even get the first step. I need a way to get the rendered edges of all the objects on my scene (I need the coordinates of the points that constitute those edges). I’ve seen some techniques to highlight the edges of geometry but I don’t think those would help (or at least I don’t know where’s the data I need).

On blender they do occlusion culling using a raycaster and then they get the “intersection” of the geometry that was hit and the geometry that didn’t get hit. I was thinking about doing the same but I wanted to see if there was a more performant way to do that. This are the pertinent nodes to generate the coordinates I want.

Can you show a screen grab of what you want. That’s a really long video.

Sure! Here’s a 1 min clip of the thing I want to achieve. I also edited my post with some more details.

So you want this effect.

That would be nice to see happening in real time.

Here is a paint brush type shader on shadertoy that may help.

If it’s only edges that you need, then try this thread