   Combining Normal Maps for Terrain
  I've tried searching Google for this, but with no joy, I keep getting conflicting answers (plus it seems whenever I search for anything normal map related on Google the results are never great)Anyway.I have my terrain normal map, which is based on the height map. Then I have my normal map for the texture I'm applying to the terrain.How do I combine these in the pixel shader for my terrain so that the normals for the texture are offset by the correct angle due to the slopes of the terrain?   
  try something like this:float3 addnormal=lerp(terrainnorm.rgb,detailnorm.rgb,0.3); //pick a lerp valuefloat distSq = 1 - (dot( 2 * (addnormal.xyz - 0.5), 2 * (addnormal.xyz - 0.5)));addnormal = (distSq*(addnormal-0.5))+(2*(addnormal-0.5));   ;  Is there are explanation to go along with that? Don't mean to be a pain, but I do like to understand the theory behind what I'm doing.   