//The Bonk LavaTop VERTEX

uniform float time;
uniform float offsetX;

void main()
{
	vec4 pos = gl_Vertex;
	
	float worldPosX = pos.x + offsetX;
	float freqA = pos.y + 25.0 * sin( 20.0 * worldPosX + time*3);
	float freqB = pos.y + 15.0 * sin( 10.0 * worldPosX + time*5);
	float freqC = pos.y + 10.0 * sin( 10.0 * worldPosX + time*-1.5);
	float disp  = (freqA + freqB + freqC) / 3;

	vec4 newPos = gl_Vertex + (vec4(gl_Normal, 1.0) * disp);

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