I am building a simulation game that and I that allows the player to create procedural buildings rather than placing static scenery items. If possible, I would like to write a shader that can take the vertices, normals, tangents, etc. and generate an identical mesh distance field so that I can leverage UE4's distance field ambient occlusion and so that various materials can detect generated geometry.
One project that appears to successfully achieve this is the Voxel Plugin. I have looked at the source but I am stumped as to where to start. I failed to find solid resources about this topic online. However, I did find this resource techniques to generate distance fields but this is not clear enough. I Any help is much appreciated. Thank you.