The Cg Tutorial: The Definitive Guide to Programmable Real-Time Graphics
||Author: Randima Fernando, Mark J. Kilgard|
List Price: $44.99
Our Price: Click to see the latest and low price
Publisher: Addison-Wesley Pub Co (26 February, 2003)
Sales Rank: 66,947
Average Customer Rating: 4.33 out of 5
Customer ReviewsRating: 3 out of 5
Good introduction to Cg
My review here is from an experienced OpenGL programmer's perspective.
This is an good introduction to the Cg shading language. It goes well beyond the free introductory PDFs on Cg that you can download from the nVidia site, and will quickly bring you up to speed. If you are unfamiliar with the new generation of graphics cards with programmable GPUs, you will love the introductory chapters. There is also an excellent chapter on bump mapping - the best, practical explanation of the technique I have ever seen. (Other books keep harping about tangent space, without explaining *why* you choose tangent space - never mentioning that it *is* possible to do it in object space.)
Now, for a few gripes:
1. There is no clear explanation for how exactly information (say, a calculated light position) should be passed from the vertex program to the fragment program. There are many ways to do this, and there is no suggested way of doing this. (eg: I can use out float3 var: POSITION, NORMAL, COLOR0, TEXCOORD0 - which one should I use and why?)
2. The vertex and fragment programs are given as such without any calling code. This may be really tough for beginners.
3. It does not provide a good reference to all the built in Cg functions. In many cases, you have to guess whether a function returns a value or modifes a parameter passed in. For example, there is only 1 line in the book about the faceforward(Ng, I, N) call. What is Ng? Does this function return any value?
4. The utility value of this book will plummet after you go through it once, since it is only an introduction. So I feel it should be priced accordingly. $45 is too much. I recommend getting it used, like I did, for half the price.
I like the book, but it is definitely not in the calibre of the Red book. (The OpenGL programming guide)
Rating: 4 out of 5
Good introduction, not very thorough.
This book is very good to get yourself started with Cg, but lacks technical details and advanced topics. Once you're on your way coding shaders, you're better off with NVidia's free cg_toolkit.pdf which is included with the Cg SDK.
Rating: 4 out of 5
Promising new technology
That's a promising technology for future of game programming. It's for advanced game programers only, no basic stuff here.
· Tricks of the 3D Game Programming Gurus-Advanced 3D Graphics and Rasterization
· Real-Time Rendering (2nd Edition)
· ShaderX2: Introductions and Tutorials with DirectX 9.0
· Game Coding Complete
· The OpenGL Extensions Guide