Hi!
That does look like a bump mapping effect, only it is kind of weak. It is hard to tell if it is correct without seeing the textures and the bump map. What kind of light are you using? A directional light?
But what I actually wanted to say was that you can compute the the tangents on the CPU like Burnt_Fyr said. I did that for ages. But eventually my terrain got so big and real time terrain editing such a major feature, that doing it on the CPU was a major performance bottleneck. And also RAM use was a major issue.
So now I am approximating them in the vertex shader:
float3 n = normalize(mul(inNormal, world));
float3 c1 = cross(inNormal, float3(0, 0, 1));
float3 c2 = cross(inNormal, float3(0, 1, 0));
// Calculate tangent
float3 t = (distance(c1, 0) > distance(c2, 0)) ? c1 : c2;
float3 b = cross(inNormal, t);
float3x3 tbnMatrix = float3x3(t.x, b.x, n.x,
t.y, b.y, n.y,
t.z, b.z, n.z);
This produces almost identical results with the CPU version and all you need is the terrain normal. It gives the best results for well behaved continuous heightmap. This is also my not too clever way of asking for feedback on this computation .