    #version 120 
    #extension GL_EXT_bindable_uniform : enable 
    #extension GL_EXT_gpu_shader4 : enable 
#define tex2D texture2D
uniform mat4 ProjectionMatrix;


varying vec3 normal;
uniform float PosY;
uniform float ttime;
uniform float randomize;
				
uniform sampler1D texture1d_pos;
varying vec4 projection_position;
uniform sampler2D texture2d_1;
varying vec4 ShadowPosZ;
varying vec4 Color;
varying vec2 UVcoordinates;

varying vec4 projection_from_camera;
varying vec4 TheGoodPosition;
	uniform float ReflectPass;
varying vec3 normalB;
uniform float isFace;
uniform float smallFaceY;
uniform float issmallFace;
void main()
{
mat4 Billboard;


TheGoodPosition=gl_Vertex.xyzz;



float sFaceY=0.0;
//smallFaceY;




vec4 glVertex= gl_Vertex+vec4(0.0,0.0,sFaceY,0.0);
vec2 TheUV;








glVertex= gl_TextureMatrix[0] * glVertex;



projection_position=glVertex;
gl_Position =  glVertex;


// texture coordinates
UVcoordinates=gl_Position.xz*0.2;



normalB=gl_Normal.xyz;

	vec3 Tnormal=normalize (gl_Normal);
Tnormal=abs (Tnormal);
UVcoordinates=gl_Vertex.zx*0.31;


if ((Tnormal.x>Tnormal.y) && (Tnormal.x>Tnormal.z)) {
	{
		UVcoordinates=gl_Vertex.zy*0.31;
	}

	
	
	}
	if ((Tnormal.y>Tnormal.z) && (Tnormal.y>Tnormal.x)) UVcoordinates=gl_Vertex.zx*0.31;
if ((Tnormal.z>Tnormal.x) && (Tnormal.z>Tnormal.y)) UVcoordinates=gl_Vertex.xy*0.31;
UVcoordinates*=5.5;



		//UVcoordinates=gl_Vertex.zy*1.31;

//UVcoordinates=gl_Position.xy*0.21;


///UVcoordinates = vec2(gl_MultiTexCoord0);

// discretize vertices
///{ 
//gl_Position.y=float (int (1.7*gl_Position.y))/1.7+gl_Position.y*0.001;
//gl_Position.z=float (int (1.7*gl_Position.z))/1.7+gl_Position.z*0.001;
//gl_Position.x=float (int (1.7*gl_Position.x))/1.7+gl_Position.x*0.001;
///}



// final projection
gl_Position = gl_ModelViewProjectionMatrix * gl_Position;
projection_from_camera=gl_Position;



// instancing
///gl_Position.y+=1.0*gl_InstanceID;

// vertex instancing
///if (gl_VertexID==244) gl_Position.y+=1.0;



// Transforming The Normal To ModelView-Space
normal = gl_NormalMatrix *  gl_Normal; 
//ormal.z*=-1.0;
// color pass
Color=gl_Color;


ShadowPosZ= ProjectionMatrix *glVertex;
ShadowPosZ=gl_TextureMatrix[2]*glVertex;

// point size
///gl_PointSize =120.0/gl_Position.w;
}











