I am following the algorithm shown in this code here. Essentially there is a simple simulation of heights and then the difference in heights on the x and y axis respectively (sampling adjacent points) ends up defining how much you add/subtract to your texture coordinate.
The result is displayed in this video here
My question is essentially do you think you could write a fragment shader that adds some sort of good looking specular highlight to this. Almost as though there were some sort of light off the edge. Just to add more feeling of depth/shape.
So far the only thing I have thought of is to look at the difference between the distorted and the normal texture coordinate which ends up looking something like this:
However since that vector is inherently 2D I am not sure how to figure out a 3D normal that would be useful for calculating the specular.
Any ideas?