Actually, there is already something available in Babylon.
https://doc.babylonjs.com/typedoc/classes/BABYLON.MeshUVSpaceRenderer
So, the idea is to render to UV Space with the shadow applied. and then use that rendered texture as a lightmap.
Actually, there is already something available in Babylon.
https://doc.babylonjs.com/typedoc/classes/BABYLON.MeshUVSpaceRenderer
So, the idea is to render to UV Space with the shadow applied. and then use that rendered texture as a lightmap.