Advertisement

GLSL? CG? Does it even matter?

Started by December 27, 2004 08:42 AM
11 comments, last by _DarkWIng_ 19 years, 11 months ago
I want to get into shader programming and have one simple question...Does it matter if I use GLSL or CG? Is either significantly better than the other?
----------------------------------------------------"Plant a tree. Remove a Bush" -A bumper sticker I saw.
Not realy, no, if you have the latest nvidia hardware that is.
GLSL works on all opengl 1.5+ harware(plus some more) with no additional software(except for the latest drivers that is), cg does not.
the GLSL syntax is allso a bit simpler than cg.
Advertisement
NVIDIA drivers currently does NOT support GLSL (which only runs on DX9 hardware), while ATI on the other hand has very badly optimized drivers for Cg, so yes it does matter.
Killers don't end up in jailThey end up on a high-score!
you guys know any glsl tutorials whose tutorial style are those like nehe's (i.e., step by step guide on how to start)?
Quote: Original post by nife
NVIDIA drivers currently does NOT support GLSL (which only runs on DX9 hardware), while ATI on the other hand has very badly optimized drivers for Cg, so yes it does matter.


Im running it just fine, but i do have a GF6800Ultra.
GLSL can be run on cards as low as the gf4(perhaps even the gf3 even).
the thing is, the nvidia GLSL compiler is actuarly based on the CG one so if you have a rellatively new nvidia card there will be only minor preformance differences.

as for tuturials, try this link
http://www.clockworkcoders.com/oglsl/index.html
Quote: Original post by lc_overlord
Quote: Original post by nife
NVIDIA drivers currently does NOT support GLSL (which only runs on DX9 hardware), while ATI on the other hand has very badly optimized drivers for Cg, so yes it does matter.


Im running it just fine, but i do have a GF6800Ultra.
GLSL can be run on cards as low as the gf4(perhaps even the gf3 even).
the thing is, the nvidia GLSL compiler is actuarly based on the CG one so if you have a rellatively new nvidia card there will be only minor preformance differences.

as for tuturials, try this link
http://www.clockworkcoders.com/oglsl/index.html


Okay, just heard so much about GLSL not working with NVIDIA drivers...
Killers don't end up in jailThey end up on a high-score!
Advertisement
Should I be ok with CG and an ATI card (Radeon 9600)?
----------------------------------------------------"Plant a tree. Remove a Bush" -A bumper sticker I saw.
Quote: Original post by nife
Quote: Original post by lc_overlord
Quote: Original post by nife
NVIDIA drivers currently does NOT support GLSL (which only runs on DX9 hardware), while ATI on the other hand has very badly optimized drivers for Cg, so yes it does matter.


Im running it just fine, but i do have a GF6800Ultra.
GLSL can be run on cards as low as the gf4(perhaps even the gf3 even).
the thing is, the nvidia GLSL compiler is actuarly based on the CG one so if you have a rellatively new nvidia card there will be only minor preformance differences.

as for tuturials, try this link
http://www.clockworkcoders.com/oglsl/index.html


Okay, just heard so much about GLSL not working with NVIDIA drivers...


Don't know where you heard that; I've been using GLSL on a GeforceFX 5900XT for months.

*edit* And I don't think nVIDIA is actively developing Cg anymore; they're shifting their focus to HLSL and GLSL, so I would suggest you use Cg only if you need your shaders to work in both OGL and D3D. Otherwise, learn GLSL.
Quote: Original post by tHiSiSbOb
Should I be ok with CG and an ATI card (Radeon 9600)?


Yes (as long as you don't use NVIDIA-specific extensions, of course).
As far as i know, GLSL Pixel Shaders are only supported on DX9 hardware meaning you cannot utillise the Pixel Shaders on GF3-GF4.
It should however run any Vertex Programs on GF3 & above.

I believe both ATI and nVidia will optimise their GLSL implementations in the near future, though i can't think of any commercial game about to be released in the near future which will use OpenGL/GLSL. This means that they can either leave it as it is, or take their time which is not a good thing.

This topic is closed to new replies.

Advertisement