Baking together complex materials into a single principled shader?

Basically what I mean is:

Assuming you have a quite complex material that you want to optimized into a single principled shader.
Is there any way to bake all the mix-rgb’s and/or mix-shaders together into each map of a principled shader.

The low poly bake options only seems to support diffuse, normal and glossyness. I would like to see roughness, specular and metalness etc as well.

I hope my question makes sense. Thanks!


Figured it out myself.

You aim an orthographic camera with ortho scale 2 towards a plane which is UV mapped to the full texture space.

Then you just input each map from the principled shader into an emission shader with strength 1 and render.

This way I can at least merge up my mix RGB’s and apply the texture mapping.