How would one bake an object's material into a mappable image?

I understand there’s no baking workflow in three, but I’m curious as to how one would work. This would be particularly useful for supporting ShaderMaterial in GLTFExporter.

I thought this would be as simple as rendering the material to a FullscreenQuad and get a texture that way, but this wouldn’t map well between geometries.

Has this been attempted within three or more generally? What are some resources to look at?

Hmm, just saw this: