float3 n = normalize(tex2D(NormalMapSampler, input.TexCoord).rgb * 2.0f - 1.0f);
float light = dot (n, -LightDirection);
float4 color = light;
return color;
And so I get this:
To me that darker grid at texel boundaries looks a lot like the consequence of how the texture sampler's linearly interpolating the normal, but if I normalize it (as in the sample code) it does nothing (or at least nothing noticeable).
Now, is there something I'm missing or are smooth normal maps like that just not meant to work up close? It's not that much of a problem because the terrain's really going to use chunked LoD so the map should never be magnified that much, but I'd like to understand if there's some error here.