The Cg Toolkit is a legacy NVIDIA toolkit no longer under active development or support. Cg 3.1 is our last release and while we continue to make it available to developers, we do not recommend using it in new development projects because future hardware features may not be supported.
NVIDIA was proud to introduce programmable shading with Cg, which supported dozens of different OpenGL and DirectX profile targets. It allowed developers to incorporate interactive effects within 3D applications and share them among other Cg applications, across graphics APIs, and most operating systems (Windows XP, Vista and Windows 7, Mac OS X for Leopard, Snow Leopard & Lion, Linux 32-bit & 64-bit) as well as balance effect complexities with client GPU capabilities.
Going forward, we recommend new development with GLSL, or HLSL for Windows applications, rather than Cg.
Cg 3.1 is our last release and will continue to be available but with no additional support.
There are open-source alternatives that address the effects part of Cg, CgFX.
One developed by an NVIDIA engineer, is called nvFx and is available on Github: https://github.com/tlorach/nvFX.
While it is not a replacement for CgFx, it provides an example of an effects layer close to CgFX, with even more features.
Other projects are using different approaches to address this high level management of shaders
The April 2012 version of Cg 3.1 added these improvements:
The February 2012 version of Cg 3.1 added these improvements:
The February 2011 version of Cg 3.0 added these improvements:
See the release notes for a complete list of changes.