Shader API - which should I choose? HLSL, Cg or GLSL?

Started by
15 comments, last by Twixn 18 years, 9 months ago
why isn't it portable?
Quote:CalvinI am only polite because I don't know enough foul languageQuote:Original post by superpigI think the reason your rating has dropped so much, Mercenarey, is that you come across as an arrogant asshole.
Advertisement
I alwyas thought CG = HLSL? they just change the name for directx? I can't remember where I heard that so im probably mistaken

-THACO
Quote:Original post by Mercenarey
why isn't it portable?
the easiest answer is: because belonts to nvidia.
+-+-+-+-+-STR
Quote:Original post by stroma
Quote:Original post by Mercenarey
why isn't it portable?
the easiest answer is: because belonts to nvidia.


It is perfectly portable across API's, OS's, and graphics cards. As I said earlier though, portability across the SM3 range of cards will probably suffer in the future as the asm interfaces won't be updated. Just because it's created and managed by nVidia is totally irrelevant.
If at first you don't succeed, redefine success.
Cg is more like HLSL for OpenGL...nVidia actually recommend HLSL over Cg for DX apps. For OpenGL apps its upto you, GLSL is just a new face to Cg on NV drivers.

But, i use Cg :D ... its more consistant atm, but i will change to GLSL/HLSL later, GLSL is just too inconsistant between graphics cards atm, probably in its major release (like 1.2 or something) i will convert back.

-Twixn-
I am Me...you cant argue with THAT can you!!!
The actual Cg language is exactly the same as HLSL. And CgFX is pretty much the same as D3DX .FX framework.
There are a few differences between Cg and HLSL...but its only a few of the library functions.

-Twixn-
I am Me...you cant argue with THAT can you!!!

This topic is closed to new replies.

Advertisement