//plantWiggle VERTEX

uniform float time;
uniform float offsetX;

void main()
{
	vec4 pos = gl_Vertex;
	vec4 new_pos = pos;
	
	float worldPosY = pos.y + offsetX;
	float freqA = pos.x + 25.0 * sin( 10.0 * worldPosY + time*2.0);
	float freqB = pos.x + 15.0 * sin( 15.0 * worldPosY + time*5.0);
	new_pos.x = (freqA + freqB) / 2.0;

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