Using latest ColladaMaya (v1.2.0.802) exporting a model from Maya 2008 with a cgfx shader, I was surprised to see the actual cgfx shader code pasted into the .dae, and no mention of the .fx file specified in maya.
Is there a way to instead store a reference to the .fx? I don’t see how embedding the shader code in every exported model would be useful, as I would imagine is almost always the case that shaders should be shared across models, especially in game dev. Also, changing shader code and needing to re-export every asset seems prohibitive.
In COLLADA 1.5, the <profile_BRIDGE> element is used to reference external FX systems like DirectX FX and CgFX. Note that <profile_CG> is for Cg not CgFX.
In COLLADA, effects are assets that are referenced by URL and are inherently sharable. You can create a .dae document that contains only a library of effects. Each effect can be described by one or more profiles as well. Check your tool’s import/export options to see if it supports the work flows you want.