In a separate announcement today, NVIDIA also unveiled a Cg Toolkit that includes a Cg Compiler, Cg Browser, CgFX file format, Cg Standard Library and a collection of pre-written Cg shaders which can be used for a variety of applications, ranging from game development to digital content creation and computer-aided design.
The NVIDIA Cg Compiler is the heart of the NVIDIA Cg programming environment. Programs written for a standard DirectX 8- or DirectX 9-compatible Graphics Processing Unit (GPU) can be compiled and run on any conforming hardware. The resulting program is a highly efficient vertex or pixel shader achieving performance levels equal to or better than hand-coded graphics programs. NVIDIA’s Cg Compiler was designed to take full advantage of NVIDIA’s GPU features and pipeline, ensuring optimal performance and visual quality. In addition, NVIDIA’s Cg Compiler uniquely supports OpenGL. Cg shaders written for OpenGL platforms are compiled and optimized to take full advantage of the extended graphics feature set in NVIDIA GPUs. NVIDIA’s Cg Compiler is also cross platform, supporting programs written for Windows, OS X, Linux, Mac and Xbox.
The most powerful feature of NVIDIA’s Cg Compiler is its forward and backward compatibility. Borrowing from NVIDIA’s famous Unified Driver Architecture (UDA), the NVIDIA Cg Compiler employs a Unified Compiler Architecture (UCA). Once written, programs will run on future or past generations of Cg-compatible GPUs and are automatically optimized at run-time for the GPU in the system. This unique capability relieves developers from the burden of optimizing for multiple generations of GPUs.
The NVIDIA Cg Toolkit Beta 1.0 will include:
- NVIDIA Cg Compiler Beta 1.0—a C-like language for programming shaders on GPUs
- NVIDIA Cg Browser—a prototyping/visualization environment with a large library of Cg shaders
- Cg Standard Library—a set of built-in functions dedicated to help the programmer with common computations
- Cg shaders—a set of pre-written examples to use and to learn from





