//The Bonk Water-Shader VERTEX

uniform float time;
uniform float offsetX;

void main()
{
	vec4 pos = gl_Vertex;
	vec4 new_pos;
	new_pos.x = pos.x;
	new_pos.z = pos.z;
	new_pos.w = pos.w;
	
	float worldPosX = pos.x + offsetX;
	float freqA = pos.y + 15.0 * sin( 15.0 * worldPosX + time*2);
	float freqB = pos.y + 10.0 * sin( 10.0 * worldPosX + time*-1.5);
	new_pos.y = (freqA + freqB) / 2;

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