varying vec3	vPOS;
//varying	vec3	cnormal;

varying vec2	cloudsTexcoords,
		cloudsTexcoords3,
		cloudsTexcoords4,
		cloudsTexcoords5;
	
varying vec2	texcoords;
varying vec2	moonTexcoords;

varying mat3	TBN;
varying mat3	iTBN;
attribute vec4	binormal; 
uniform vec2 	ofs;

uniform float 	skyDepth;

// vertex attributes
attribute vec3 			s2_vertex;
attribute vec3			s2_normal;
attribute vec4			s2_texcoords; 
attribute vec4			s2_binormal; 

void main()
{
	vec4 vertex=vec4(s2_vertex,1.0);
	gl_Position = gl_ModelViewProjectionMatrix*vertex;
	vPOS=vertex.xyz;
//	cnormal.xyz=-vertex.xyz;
	
	cloudsTexcoords3=( s2_texcoords.st*vec2(500.0) )+ofs*2.0;
	cloudsTexcoords=( s2_texcoords.st*vec2(500.0) )+ofs*0.5;
	cloudsTexcoords5=s2_texcoords.st*vec2(15.0)+ofs*0.1;
	cloudsTexcoords4=s2_texcoords.st*vec2(0.25)+ofs*4.0;
	
	vec4 normal4      	= vec4( s2_normal.xyz, 0.0 );
	vec4 binormal4      	= vec4( s2_binormal.xyz, 0.0 );
	vec4 tangent4      	= vec4(cross(binormal4.xyz,normal4.xyz),0.0);
	binormal4.xyz*=s2_binormal.w;
	
	/*iTBN[0]=vec3(tangent4.x,binormal4.x,normal4.x);
	iTBN[1]=vec3(tangent4.y,binormal4.y,normal4.y);
	iTBN[2]=vec3(tangent4.z,binormal4.z,normal4.z);*/
}