#version 330 core

// vertex shader for waterfalls

layout(location = 0) in vec2 vertPos; //coords (z,y)
layout(location = 1) in vec2 texUV;

smooth out vec2 UV;
smooth out vec4 aPos; // FS uses only aPos.y (for fog)


////////////////////////////////////////////

uniform mat4 MVP;
uniform int iflag;

uniform vec3 wPos;


void main(){


	if(iflag==0) //ribbon
		aPos = vec4( wPos.x-0.01, vertPos.y, vertPos.x, 1.0 );

	else if(iflag==1) //particles
		aPos = vec4( wPos.x, vertPos.y, vertPos.x, 1.0 );


	gl_Position = MVP * aPos;
	UV = texUV;
}


