attribute vec3 vPosition;
attribute vec2 vTexCoord;

uniform mat4 ProjectionMatrix;
uniform mat3 ModelRotateMatrix;
uniform vec3 ModelTranslateVector;
uniform vec3 CamPos;

varying vec2 texCoord;
varying vec3 vertexPos;
varying vec3 camVec;

void main()
{
	vec4 realVertexPos = vec4(ModelRotateMatrix * vPosition.xyz + ModelTranslateVector, 1.0);
	gl_Position = ProjectionMatrix * realVertexPos;
	
	texCoord = vTexCoord;
	
	camVec = (vPosition.xyz - CamPos);
	
	//camVec = vec3(0, 1, 0);
	
	//camVec.y = -camVec.y;
	
}