Hello all!
I am still having a lovely time writing my terrain engine doodad.
(I don't know why, I just find it really enjoyable).
anyhoo, I just tried generating a normal map for it (I am using geomipmapping, so the further away bits where looking a bit undetailed).
And I just got it working (yay!).
I just wanted to ask if the way I am doing it is a bit crazed.
Using the high-res height map, I am greating an array of normals. (normalised, xyz in the range -1 to 1).
I am then adding 1 and dividing by 2, so it is in the range 0 to 1.
Then I create an image, with the values encoded as colours.
In my shader, I read the texture sample, normalise it, then subtract 1 and multiply by 2 (so xyz are in the range -1 to 1 again).
(I think I then normalise it again)
And then I have my lovely per pixel normal.
Just wonderered if there is a less convulted way of achieving this?
J.