[Community Project] WIP Weather & Water Shader

BTW I’m not sure if anybody modified the height method to fix or that anyone even noticed but the height value returned for position (x,y) is not actually the height for the calculated point at (x,y). The full gerstner equation is not what is being solved in my code.

The actual height value at a point is returning a height but also a x and y displacement. So using the height directly at x and y is inaccurate. I was eventually planning on fixing to return true height of wave at x,y instead of the 3d displacement of point x,y. The difference is not that big but if you use large waves with a high steepness on a small object, you will see that object is floating in front of the crests. is not really an for for boats as that are many wavelengths in size usually.

A quick solution is to modulate the height value by how much it is displaced in the x,y plane giving you a tighter fit to the actual wave otherwise the true solution requires you to solve a parametric equation for each wave.