3ds max / Maya / Lightwave / etc exporting CgFX

This is a 3rd party software question i'd highly appreciate if you could answer.

How to export CgFX from 3ds Max / Maya / Lightwave / etc, for further conversion into ShaderLab?

You can cut and paste the bulk of the Cg code from the CgFX file to a ShaderLabs file, because ShaderLabs supports Cg, but you still have to rewrite the top-level constructs of how to handle passes, renderstates, fallbacks, and semantics.

By default, DirectX shaders, including CGFX files, are saved in \maps\fx\ in the 3ds Max program directory.