Why would I want to use Cg?

Started by
18 comments, last by FreJa 21 years ago
Why? Thanks...
"Through me the road to the city of desolation,Through me the road to sorrows diuturnal,Through me the road among the lost creation."
Advertisement
eye candy.
http://developer.nvidia.com/view.asp?IO=cg_testimonials
It is faster if you keep everything in the video memory, rather than let the CPU do the stuff, then reupload your vertex or textures in the video memory.

Height Map Editor | Eternal Lands | Fast User Directory
Cg allows you to develop vertex and fragment programs in a high level shading language that can be used in OpenGL or DirectX. The benefit of using a high level language is that its much much easier to write and debug your code when its written in C like syntax instead of assembly.

You get nice features such as functions, a preprocessor, for/while loops, if statements, a built in standard library with many common math, geometry, and texture functions.
---I write code.DelphiGL (http://delphigl.cfxweb.net)
At this time, no reason at all. Stick with asm approach at least for now. The CG compiler is still lacking stuff that asm would allow. This goes both for ms hlsl and CG. I would use glslang once it''s released instead of CG but that is me.
I want to make some per-pixel lighting effects and bump mapping, is Cg the best option?
How is Cg being accepted by the game industry?

[edited by - FreJa on April 22, 2003 6:15:59 AM]
"Through me the road to the city of desolation,Through me the road to sorrows diuturnal,Through me the road among the lost creation."
no.

perpixellighting, bumpmapping is doable on hardware that is not supported by cg. gf1,gf2,radeons before 9500, etc.

cg is used in the gaming industry by companies that let their souls get buyed by nvidia, and add the funny "nvidia, the way its ment to be played" logo in front of their games.

"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

quote:Original post by davepermen
no
perpixellighting, bumpmapping is doable on hardware that is not supported by cg. gf1,gf2,radeons before 9500, etc.

Should I not have cool effects in my game because someone has a crappy 10$ gf1, gf2?

quote:Original post by davepermen
cg is used in the gaming industry by companies that let their souls get buyed by nvidia, and add the funny "nvidia, the way its ment to be played" logo in front of their games.

What else do You suggest that we do? Code in assembly? Sell our souls to ATI?
Ok your right about the logo
Cg is Nvidia''s take on how pixel shaders should/can be used. This is fine, but for one thing. DX9 now does it all. And using DX9 Fx shader script, (same as Nvidias essentially) there is no need to use Cg anymore, in any case.

My advice - get DX9 SDK. And be happy :-)

Also IMHO people shouldnt get too attached to writing fancy pixel shaders anymore. We use the FX shader tool for 3DS Max, and this pretty much (not entirely) lets the artist design the look of the shader, which is a great thing. IMHO. We load in the FX shader afterwards.. and artists are very happy with the consistant results :-)

Eventually we hope to pipe pretty much all resource dev through Max, and let the designers and artists be in control of content, with the tech just loading in resources (shaders included).



why? and you people with your obession with money and crap, nVidia is a good company just like ATI is. To get to the point, use cg so you dont have to worry about extensions in OpenGL.

This topic is closed to new replies.

Advertisement