For instance. Look at our equations to describe the flow of water. How do we come up with those? What do we measure? Can we do the same for other liquid substances? ]]>

Taking the same Bezier surface and putting it on all 4 sides of a similar center "tile" bezier surface.

Would save the world. Thanks! ]]>

Code :

vec3 getNormal() {
float3 normal = float3(0.0, 1.0, 0.0);
// Get 2 vectors perpendicular to the unperturbed normal, and create at point at each (relative to position)
//float delta = 1024.0 / 4.0;
float delta = (vMorphFactor + 1.0) * uScale / TILE_RESOLUTION;
vec3 dA = delta * normalize(cross(normal.yzx, normal));
vec3 dB = delta * normalize(cross(dA, normal));
vec3 p = vPosition;
vec3 pA = vPosition + dA;
vec3 pB = vPosition + dB;
// Now get the height at those points
float h = getHeight(vPosition);
float hA = getHeight(pA);
float hB = getHeight(pB);
// Update the points with their correct heights and calculate true normal
p += normal * h;
pA += normal * hA;
pB += normal * hB;
return normalize(cross(pB - p, pA - p));
}

So for each vertex, it's getting two perpendicular points, then finding the differences between the points and the vertex position, then cross-producting those differences to find the normal. I thought this would work, but the lighting looks really weird so I don't think it's calculating the normal correctly. If anyone knows what is going wrong I would be happy to know. ]]>