I'm looking for a way to give my users the option to use automatically generated UV coords instead of UVs delivered by imported meshes. So something equal like in Cinema 4D where you can choose between UVW, Cubic, Cylindric, Spherical, etc.. mapping. Finally I want to generate the UVs based on vertex positions and normals. I think this should be possible in Vertex or Geometry shader, but I've no idea actually. I know the result would not be always perfect for non-convex meshes, but most cases are for simple boxes, spheres or planes.
Any help, links or codes are appreciated.