   Beginner to intermediate book about shaders with HLSL and D3D
  I'm looking for a book about how to make shaders with HLSL and D3D. I'm an almost total beginner but I have a few basic sources and know the theory so I can probably manage to read a book that starts on the intermediate level and assumes some basic previous knowledge. What I want is preferably a book that is like a reference/encyclopedia, loaded with examples with code for how to make the most commonly used effects. Here are the types of examples I'd like the book to contain:- how to remake pretty much all of the fixed function pipeline effects but do it with shaders- make depth of field blur- making shadows and reflections in mirrorsPreferably the book should also cover these, but it's not necessary:- making the fast, advanced per-pixel shadows used in the Doom3 generation games- make nice blended out edges for shadows and other effects- make refraction/reflection effects in water- making geometrical water- weather effects- shading skydomesCan someone recommend a good reference book that at least contains the points I highlighted in bold? Also what sources did the rest of you use to start learning shaders? I'm interested in all sources (links, books with a mini review, anything) I can get so that if there isn't any book I can build up my own "list of reference examples" to learn from.   
  If you're really almost a total beginner you may not want to start on some of those topics which are quite advanced.  You gotta work your way up you know =)As for many of these effects you can find good articles in the GPU Gems and ShaderX series.  For learning HLSL there are the workshops with the DX SDK, and just about every sample uses a shader waiting to be explored!   ;Quote:Original post by jameswIf you're really almost a total beginner you may not want to start on some of those topics which are quite advanced.  You gotta work your way up you know =)As for many of these effects you can find good articles in the GPU Gems and ShaderX series.  For learning HLSL there are the workshops with the DX SDK, and just about every sample uses a shader waiting to be explored!Well, beginner is a matter of definition I guess :), my definition was to call simulating all fixed function pipeline effects begginer, more advanced stuff than that intermediate, and cutting edge stuff advanced... I know the principles and think I can remake about 80% of the fixed function pipeline effects. But I have some holes in my basic knowledge base (because I got the knowledge from so many different sources), that I'm really eager to at least get hold of some complete reference material covering doing all of the fixed function pipeline effects in shaders to begin with, before moving on to things such as GPU Gems and ShaderX.   ;  jamesw has a valid point, but the sort of book you want tends to have lasting value. If you don't understand it immediately it's likely to be something you can go back to once you've got to the appropriate level [smile]I've not personally read them (they're on my list though [wink]), but people say a lot of good things about the ShaderX and GPU Gems (#1 and #2) series of books. They're more towards the intermediate/advanced level and they tend to cover the sort of material you're after...One other thing to consider - the more general advanced effects books tend to cover some OpenGL as well. Doesn't usually matter, but worth checking before you part with your cash!hthJack   ;  Also, I think gametutorials.com has a few free shader lessons, swear I seen on on D3D + HLSL but I could be wrong.  I know they have OpenGL and GLSL for sure (not what you want I know).   ;  Coding4Fun recently published 10 video tutorials on game development. Tutorials 6, 7 and 8 focus on shaders. The entire series is focused on .NET and Managed DirectX, so that could be a potential problem if you're not using either of those; either way, most of the shader development goes on inside of FX Composer, so there's still plenty of material to get out of the videos. As for books, I personally don't have any of these, and can't guarantee that they satisfy all of your criteria, but I have heard they're good from several trustworthy sources, so I'll go ahead and list them:These two appear to be better reference books than all-around introductions:- The ShaderX series.- The GPU Gems series.On the other hand, these appear to be geared towards somebody with little to no experience with shaders:- Shaders for Game Programmers and Artists- Programming Vertex & Pixel Shaders;  Programming Vertex & Pixel Shaders by Wolfgang Engel is a great book for the basic to intermediate material.  After that both GPU Gems & ShaderX series are excellent references for the more advanced techniques.   