so there is essentially 2 steps to the algorithm.
first the scene is voxelized into cells storing the index of the closest triangle for each overlapping voxel.
this is done entirely in compute using an optimized version of voxel pipe by @jpantaleoni.