As of this writing, there doesn't seem to be a real reference manual for HLSL and the shader assembly language. This book makes a good effort at filling that role, however.
The graphics programmer is likely to find this very useful. It integrates C application code with shader examples. It also discusses on-the fly compilation, use of resources for shader source code, the relationships between vertex and pixel shaders, texture samplers, and 'techniques' for pulling all the pieces together. Performance programming gets some discussion, but isn't a central topic. Appendices specify the shader language in dryly formal terms, but the descriptive chapters make most language features very clear.
The shader programming model is decidedly non-standard. A rendering program does not work at all like a C program. Yes, a C/C++ programmer will be able to follow a shader's internals easily enough. The problem, though, is that a C program is in charge of what data gets handled when. Everything in a rendering program is silently a callback, however. It's invoked by some execution engine that sequences the input and output data, and even synchronizes multiple (and almost invisible) threads of execution. The hardware rendering program also interacts strongly with the application running in the main processor, partly through "semantics", reflective "annotations", and various parameter-setting mechanisms. There is a huge amount of mechanism at work, and it gives the real meaning to the interacting programs on the host and graphics engine. That mechanism is described in a black-box way, what it does rather than how it works. I think I've reverse engineered the workings, enough for my purposes, but this book did not address my needs directly.
Still, it's the best I've found. Real graphics programs, like games and scientific visualization, are much more than lines and circles. This book, with its examples, will surely help the beginner acquire a working knowledge.
Read DirectX9 SDK documents first.
Rating: 2/5
I suggest to read DirectX9 SDK document fist that comes with DirectX9 SDK. Think about this book later. This book ends explanation as stream of comments of the simple sample shaders that come with SDK. I'd say this book is "out of focus". There are bunch of important things that should be explained - are not in this book. Such explanations are in SDK document. However, if you want to be away from computer and learn about shaders in relaxed in your bed or at a cafe, or if you are an naturalist who do not want to waste printer inks and papers to print out SDK document, in terms of such points, this book may worth to you.
Does what the title says
Rating: 5/5
If you want what any professional game programmer would expect from this book, buy it - it does exactly that. It isn't a CG specific book and isn't aimed at C# programmers, but you wouldn't expect it to be. It's reasonable documentation and tutorial material for writing shaders.
The graphics programmer is likely to find this very useful. It integrates C application code with shader examples. It also discusses on-the fly compilation, use of resources for shader source code, the relationships between vertex and pixel shaders, texture samplers, and 'techniques' for pulling all the pieces together. Performance programming gets some discussion, but isn't a central topic. Appendices specify the shader language in dryly formal terms, but the descriptive chapters make most language features very clear.
The shader programming model is decidedly non-standard. A rendering program does not work at all like a C program. Yes, a C/C++ programmer will be able to follow a shader's internals easily enough. The problem, though, is that a C program is in charge of what data gets handled when. Everything in a rendering program is silently a callback, however. It's invoked by some execution engine that sequences the input and output data, and even synchronizes multiple (and almost invisible) threads of execution. The hardware rendering program also interacts strongly with the application running in the main processor, partly through "semantics", reflective "annotations", and various parameter-setting mechanisms. There is a huge amount of mechanism at work, and it gives the real meaning to the interacting programs on the host and graphics engine. That mechanism is described in a black-box way, what it does rather than how it works. I think I've reverse engineered the workings, enough for my purposes, but this book did not address my needs directly.
Still, it's the best I've found. Real graphics programs, like games and scientific visualization, are much more than lines and circles. This book, with its examples, will surely help the beginner acquire a working knowledge.