![]() |
Look up CG or cg in Wiktionary, the free dictionary. |
This disambiguation page is currently linked from a large number of articles. Please help direct these ambiguous links to articles dealing with the specific meaning intended. (February 2012) |
CG, Cg or cg may stand for:
|
![]() |
This disambiguation page lists articles associated with the same title. If an internal link led you here, you may wish to change the link to point directly to the intended article. |
Cg (short for C for Graphics) is a high-level shading language developed by Nvidia in close collaboration with Microsoft for programming vertex and pixel shaders. Cg is based on the C programming language and although they share the same syntax, some features of C were modified and new data types were added to make Cg more suitable for programming graphics processing units. This language is only suitable for GPU programming and is not a general programming language. The Cg compiler outputs DirectX or OpenGL shader programs. Since 2012, Cg is deprecated, with no additional development or support available.
Due to technical advances in graphics hardware, some areas of 3D graphics programming have become quite complex. To simplify the process, new features were added to graphics cards, including the ability to modify their rendering pipelines using vertex and pixel shaders.
In the beginning, vertex and pixel shaders were programmed at a very low level with only the assembly language of the graphics processing unit. Although using the assembly language gave the programmer complete control over code and flexibility, it was fairly hard to use. A portable, higher level language for programming the GPU was needed, so Cg was created to overcome these problems and make shader development easier.
I bought a flat
Diminished responsibility
You're de ninth person to see
To be suspended in a seventh
Major catastrophe
It's a minor point but gee
Augmented by the sharpness of your
See what I'm going through
A to be with you
In a flat by the sea