Stretched Decals

I cannot use decal textures because the mesh does not necessarily have a clean UV. So i need to find a way to calculate a new set of UV’s programatically for the mesh and then use the decal texture. Or i could have my own implementation of the mesh decals but i read that it may not work in babylon in this article.