 vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
 void calcAtmospherics(vec3 inPositionEye);
 
-float calcDirectionalLight(vec3 n, vec3 l);
+vec3 calcDirectionalLight(vec3 n, vec3 l);
 
 vec3 atmosAmbient(vec3 light);
 vec3 atmosAffectDirectionalLight(float lightIntensity);

	pos = (modelview_matrix * vert);
	gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
#endif
	vary_texcoord1 = (texture_matrix0 * vec4(texcoord1,0,1)).xy;
	vary_texcoord2 = (texture_matrix0 * vec4(texcoord2,0,1)).xy;
#if INDEX_MODE == INDEXED

uniform vec3 light_attenuation[8]; 
uniform vec3 light_diffuse[8];

vec3 calcDirectionalLight(vec3 n, vec3 l)
{
        float a = max(dot(n,l),0.0);
        return vec3(a,a,a);
}

vec3 calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)
{
	//get light vector
	vec3 lv = lp.xyz-v;
