Original Post
Hi all, I'm trying to do ye olde water via (GLSL) shaders, and having 'fun' with the normal map. From the examples I've looked at, a normal is read from the normal map texture and then some funny things are done to it, like:
I suspect the normals are the problem, because using an up-vector normal + fresnel gives a correct image:
Umm, so any ideas on how I should manipulate the water normal map?
surfNorm = surfNorm * 2.0 - 1;
I think this is transforming the range of the normal (i.e. from 0..1 to -1..1)? Thing is, applying fresnel to this and visualising gives totally wrong results: (red is 'refracted', blue is 'reflected')
I suspect the normals are the problem, because using an up-vector normal + fresnel gives a correct image:
Umm, so any ideas on how I should manipulate the water normal map?