PDA

View Full Version : Where to start with shaders? HLSL? Cg? GLslang?


Gamedev
09-29-2006, 11:41 PM
Hey guys,

I'm an environment artist looking to expand my skills and am interested in writing my own shaders. I've starting reading about them but really just wanted some input on where to start. What tools to use, which language is prevalent, etc.

I'm looking to use these shaders as .fx files in 3dsmax or game engines such as Quest3D. I'm just not really sure where to find good books, resources, as well as which software I should be using and the general overview / workflow.

Thanks in advance!

boomji
10-05-2006, 10:32 AM
heres one that's pretty good.

texturing& modeling:a procedural approach(3rd edition).David ebert,kenton musgrave et all

wolfgang engel ones could come in handy as well.


b

rendermaniac
10-05-2006, 03:02 PM
If you want the most protability with real time shaders, it is best to learn Cg. This is because it is a (now) a metalanguage which will compile down to HLSL/GLSL/whatever assembly.

Personally I think GLSL has a slightly nicer syntax (although they were really slack in some areas - the nvidia driver fixes these - #inlcludes etc), but it is also newer and less in common usage.

Also Cg is very close to HLSL so you are almost learning the same thing. The main differences are what has been added recently - eg connecting shading code together.

Simon

stew
10-05-2006, 05:39 PM
This book was helpful for me:
http://developer.nvidia.com/object/cg_tutorial_home.html

Also, one advantage of Cg over HLSL is that it's not tied to DirectX - it also runs with OpenGL, and with it on Mac OS X and Linux.

CGTalk Moderation
10-05-2006, 05:39 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.