CgFX shaders

 
 
 

The compiled CgFX plug-in in Maya lets you create hardware shaders.Previously, you may have downloaded the Cg / CgFx libraries from nVidia®. For more information, see About hardware shaders.

Note

This plugin uses Cg 3.0.015. The cg compiler (cgc) and all dlls are included in the bin directory of Maya.

Older effects support a different syntax .fx (MS) files than the current ones: .cgfx. Because Cg is a superset of HLSL, CgFX 3.0.015 exposes all the capabilities of Cg (Interfaces and unsized arrays). Therefore, CgFX 3.0.015 has a format called .cgfx that allows developers to program in the Cg language.

If you've installed an older version of CgFX, you must uninstall it or disable the environment variables that are set with the install.

Basic workflow

The following steps outline the basic workflow to use the CgFX plug-in.

To create and work with a CgFX shader, see Work with CgFX shaders.

CgFX limitations and other notes

Important information about the CG language including the limitations of the CgFX plugin are available on the nVidia website (www.developer.nvidia.com), especially www.developer.nvidia.com/object/cg_toolkit.html.

Note

You must use an nVidia graphics card if your CgFX shader utilizes nVidia specific profiles. Otherwise, you will not be able to preview these shaders in the scene view.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License