So I understand that for best results one uses a height (or bump) map and a normal map together.
And I also understand that one can calculate a normal map from a height map using some sobel operator.
But out of curiosity I wonder how the first games that supported bump mapping did it.
I found this fragment shader code that seems to do it, but I am not sure: OpenGL Bump Map -- Texture artifacts ?
If the code above does exactly what I am looking for, can someone explain the line
vec3 normalDirection = normalize(tangenteSpace*(texture2D( bump_tex, f_texcoord ).rgb*2.0 - 1.0));
How can you get a normal from a bump ?
I understand what tangent space is mathematically but how does it work here ?
Is it a vec4 or a matrix ?
So basically my question is: How was bump mapping done without a normal map in the old days ?