varying vec2 Texcoord;
varying vec2 Texcoord2;

uniform float waveframe;

void main( void ) {
  vec4 uv = gl_TextureMatrix[0]*gl_MultiTexCoord0;
  Texcoord    = uv.xy;
  
  vec4 pos = vec4(	gl_Vertex.x,
					gl_Vertex.y
					+ sin(gl_Vertex.x*10.0+waveframe + sin(gl_Vertex.z*100.0))/60.0
					+ cos(gl_Vertex.z*1000.0+waveframe)/40.0,
					gl_Vertex.z,
					1.0);
  
  gl_Position = gl_ModelViewProjectionMatrix * pos;
}
 
// m_vertices[index][1] = (-0.5f + (m_noise->getValue((x * 2) + m_frame, (z * 16) + m_frame)) / 4.0f);
