#version 330

precision highp float;

in vec4 vVertex;

float rand(vec2 co);

void main(void) {
	float pi = 3.1415926535;
	
	gl_Position = vVertex;
	gl_Position.y += sin(1.7*pi+vVertex.x*pi*1.5)*4.0+cos(vVertex.z*pi*3.0)*3.5;
	gl_Position.y += rand(vVertex.xz)*2.0;
}

float rand(vec2 co)
{
	return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
}