//The Bonk Water-Shader VERTEX

uniform float time;
uniform float offsetX;

void main()
{
	vec4 pos = gl_Vertex;
	float worldPosX;
	worldPosX = pos.x + offsetX;
	float freqA = pos.y + 25.0 * sin( 20.0*worldPosX + time*6.0  );
	float freqB = pos.y + 15.0 * sin( 10.0*worldPosX + time*10.0 );
	float freqC = pos.y + 10.0 * sin(  2.0*worldPosX + time*5.0  );
	pos.y = (freqA + freqB + freqC) / 3.0;

	gl_Position = gl_ModelViewProjectionMatrix * pos;
	gl_TexCoord[0] = gl_MultiTexCoord0;
}
