Nvidia dropping support for CG

Hey,
Since nvidia is dropping/dropped supporting CG will unity keep using CG or switch to a different language?
thanks!

Cg is the same language as (DX9) HLSL for 99% of real world use cases. You could say that Unity uses Cg, or you could that it uses HLSL, and it would be exactly the same thing.

In Unity 4.5, the actual shader compilers used for different platforms are as such: D3D9 uses Cg to compile shaders; D3D11 uses HLSL; OpenGL uses either Cg or hlsl2glsl+glsl-optimizer; OpenGL ES uses hlsl2glsl+glsl-optimizer.

In Unity 5.0, the shader compilers will be as follows: D3D9 & D3D11 uses HLSL; OpenGL & OpenGL ES will use hlsl2glsl+glsl-optimizer. So you could say that Cg is gone (we’d still be using Cg to do “fake dummy compilations” needed by surface shaders).

But again, the language for shaders is Cg or HLSL; they are one and the same.

1 Like