Shader Material - Shadow Effect on Cube

Maybe you can try to reuse the code from @Pryme8 that renders edges with thickness (Trying to get my Barycentric Shader working as a custom material? - #2 by Evgeni_Popov):

https://playground.babylonjs.com/#LFZ3QM#2