Shaders in Cg?
I'm looking forward to learn shader programming and as far as i know, there a two ways to do that: MS's HLSL and nVidia's Cg.I don't know very much on this topic and I would like knowing what differences are there between them, and which is better to start with.
I already know well C/C++ syntax, so Cg seems to be an easiest way for me to go.
Anyway, will we be able to load Cg shaders into XNA?
[446 byte] By [
KolRn] at [2008-2-21]
HLSL is the only way you will be able to run shaders on XNA, but don't worry, both Cg and HLSL started out life as the same language - you could easily take a shader in Cg and get it to run in HLSL. I still use my orignal nVidia CG shader book as a reference when writing HLSL.
Andy.
Postscript: You will also want to understand the effects (.fx) file format, which is where you will typically find the HLSL code. Good luck!