Cg 1.5


Quick Links


The Cg Toolkit provides a compiler for the Cg language, runtime libraries for use with both leading graphics APIs, runtime libraries for CgFX, example applications, and extensive documentation. Supporting over 24 different OpenGL and DirectX profile targets, Cg will allow you to incorporate stunning interactive effects into your 3D applications. The components include:

• NVIDIA Cg Compiler Release 1.5
• Unified Cg/CgFX Runtime
• Cg User's Manual
• Cg Language Specification
• Example programs and shaders

We hope that you will enjoy the exciting world of Cg programming.

Latest Cg Toolkit Features

Release 1.5 of Cg introduces several new features:

• OpenGL GLSL profiles
• Direct3D9 SM3.0 profiles
• Procedural API for creating effects (COLLADA support)
• New API for combining programs from multiple domains
• Improved DirectX support for CgFX files
• Multithread safe Runtime
• Universal binaries for Mac OS X 10.4 (Tiger) with support for both PPC and x86
• Support for Solaris10 on x86
• Improved documentation, including Cg Standard Library and standard CgFX states
• New OpenGL and Direct3D9 examples
• Supports loading pre-compiled objects (CG_OBJECT in cgCreateProgram)
• Enhanced runtime and compiler performance

Please see the release notes for details, known issues, and more.

Cg 1.5 ships with native implementations for Win32, Win64, Linux (32-bit and 64-bit), MacOS 10.3 (Panther), MacOS 10.4 (Tiger), and Solaris10 x86.

Cg 1.5 should be backward compatible with apps written against Cg 1.4.1.

New Profiles

Vertex Shader


Pixel Shader

glslv GLSL Vertex Shader    glslf GLSL Fragment Shader
vs_3_0 DX9 Shader Model 3 Vertex Shader   ps_3_0 DX9 Shader Model 3 Pixel Shader
Existing Profiles

Vertex Shader


Pixel Shader

vp20, vp30, vp40 OpenGL NV_vertex_program   fp30, fp40 OpenGL NV_fragment_program
arbvp1 OpenGL ARB_vertex_program   fp20 NV_register_combiners and
vs_1_1 DirectX 8 Vertex Shaders 1.1   arbfp1 OpenGL ARB_fragment_program
vs_2_0, vs_2_x DirectX 9 Vertex Shaders 2.0, 2.x   ps_1_1, ps_1_2, ps_1_3 DirectX 8 Pixel Shaders 1.1 - 1.3
      ps_2_0, ps_2_x DirectX 9 Pixel Shaders 2.0, 2.x

Cg_book_Small_Cropped.jpgThe Cg Tutorial Book

The Cg Tutorial: The Definitive Guide to Programmable Real-Time Graphics takes a tutorial-based approach to teaching Cg and high-level shading, and it comes complete with a standalone application that allows you to try out and modify the book's examples. To learn more about The Cg Tutorial, please visit the book's home page.



[Download] Cg Release Notes
[Download] Cg Users Manual (Japanese)
[Download] Cg Specifications (PDF)

Install Packages
[Download] Windows
[Download] Mac OSX Panther Installer
[Download] Mac OS X Tiger Installer
[Download] Linux X86 (TAR.GZ)
[Download] Linux X86-64 (TAR.GZ)
[Download] Linux X86 (RedHat RPM)
[Download] Linux X86-64 (RedHat RPM)
[Download] Solaris X86 (TAR.GZ)

New Examples
[Download] Examples (Zip)
[Download] Examples (.TGZ)

Cg Redistributable Binaries
A Cg redistributable binaries package contains the libraries and executables for all supported platforms of a Cg release in a single zip file. Go to the "Cg redistributable binaries" page.

Previous Versions
Cg Toolkit 1.5 Beta 2
Cg Toolkit 1.5 Beta 1
Cg Toolkit 1.4.1
Cg Toolkit 1.2.1
Cg Toolkit 1.1