   general shader question
  I'm new to shaders and am just curious about how many shaders are used per game in general.  For example, I have a basic vertex shader that works with position, normal, and UV elements.  This however, does not play nice with my previously lit terrain, having only position and UV elements.  I'll need another shader that doesn't expect normals.  Although I'm sure its something to avoid, is switching shaders a large amount of overhead?  Are there any suggested links/books on the matter?   
  I am not sure if I catch your questionbut if you just want current shader not dealing with NORMAL ok, just neglect it, or give some default value to it, it's totally OK, no need to write another shader.As your title , I don't quite follow that, I think there are types of shader. as to the number I think each type one,   ;  This is a common problem. The perpetuation of different shader states, materials, lighting conditions, etc. can lead to a massive combinatorial explosion of shaders.Having lots of different shaders makes for efficient shader code, but is a massive pain to manage and maintain. If you don't have a lot of different shaders, it's probably fine. If you need to deal with hundreds of slightly different shaders to cope with every different condition, then you should look towards a different solution.A common method is called the "uber shader" approach - dump everything into one massive ("uber") shader and switch features on/off at runtime. It means your shaders aren't as hard to manage, but it sacrifices runtime performance.   ;  It sounds like having multiple shaders per game is normal.  I would imagine that to be the case, and we just try to need as few as possible.  For clarification, I was curious how many shaders (I'm doing vertex shaders at the moment, perhaps its different for pixel shaders) would be typical for any given game.  After writing a vertex shader, I see its obviously dependent on the vertex declaration.  After that realization came the fact that I have geometry that doesnt need lighting calculations (terrain textures had static lighting precalculated), and so it doesnt have normals attached to it's verticies.  Thus, I need a seperate shader for "unlit" verticies.  I suppose lit and unlit geometry is 99% of what is needed though.  Perhaps textured and multitextured geometery would multiply that to 4 different shaders....?  Then again, that's probably what pixel shaders are for.  So much to learn, but I want to know it all NOW. LOL   ;  I don't know exactly, but I presume a big game like Crysis would have hundreds (if not thousands) of individual combinations they needed to deal with.   ;  Left 4 Dead has over 300 if you count shader version target duplicates (about 50% written to 2.0 model, the other half to 2.0b).   