This is from www.cgshaders.org on converting from cg to .fx files
"Sure, just place it into an .fx context.
The .fx file format is just a "wrapper" for one or more Cg shaders, so that the shaders can be easily shared by applications. So to convert a cg shader to an fx shader, copy it to a new file with the .fx suffix, then add:
* Declarations for the shader's uniform parameters ("tweakables")
* A technique declaration that compiles and calls the shader
You can find examples of tweakables and techniques in any existing .fx file"
Source: http://www.cgshaders.org/forums/viewtopic.php?t=1555
Dark Basic Pro - The Bedroom Coder's Language of choice for the 21st Century.