attribute vec2 texCoord1;
attribute vec3 posOff;
attribute vec3 normal;
varying vec2 texCoord;
varying vec3 norm;
varying vec3 eye;
varying vec3 lightPosVary;
uniform float anim;
uniform float anim2;
varying float colMod;
uniform vec3 lightPos;
uniform sampler2D texSamp;
varying float limit;

void main()
{
 
 texCoord = texCoord1;
 vec3 theVal = gl_Vertex.xyz-posOff;
 
 float exploAnim = anim*(1.0+cos(posOff.x*0.05)*1.8 + 1.8)*0.02;
 
 
 vec3 sample =  texture2DLod(texSamp,vec2(posOff.y,posOff.z),0.0).rgb;
 sample/=255.0;
 
 colMod = (sample.r + sample.g + sample.b)*0.33333;
 colMod*=0.7;
 norm = gl_NormalMatrix*normal;
 eye  = (gl_ModelViewMatrix*gl_Vertex).xyz;
 lightPosVary = eye;
 limit = posOff.x;
 float scaler = (sample.r + sample.g + sample.b)*0.33333;
 scaler = pow(scaler,1.34);
 gl_Position = gl_ModelViewProjectionMatrix*(gl_Vertex*vec4(1.0,scaler*30.0,1.0,1.0));

}