 #endif	/*	F_DiffuseTexture	*/
 
 #if defined( F_ShadowTexture )
-	v_TexCoordShadow = Shadow.transform * vertex;
+	lsVertex = Shadow.transform * wsVertex;
 #endif	/*	F_ShadowTexture	*/
 }     
 
 [FragmentShader]
+varying vec4 wsVertex;
+
 #if defined( F_VertexColor )
 varying vec4 v_Color;
 #endif  /*  F_VertexColor    */
 
 #if defined( F_VertexNormal )
-varying vec3 v_Normal;
-varying vec3 v_LightPos;
-varying vec3 v_LightDir;
-varying vec3 v_VertexPos;
+varying vec3 wsNormal;
+varying vec3 wsLight;
+varying vec3 wsLightDir;
 #endif  /*  F_VertexNormal    */
 
 #if defined( F_DiffuseTexture )


#if defined( F_VertexNormal )
	#if F_LightType == 1
	float attenuation = distanceAttenuation( v_VertexPos, v_LightPos, Light.range, 1.0, 0.0, 25.0 );
	float intensity   = pointLightIntensity( v_VertexPos, v_LightPos, normalize( v_Normal ) ) * attenuation;

	#elif F_LightType == 2
	float attenuation = distanceAttenuation( v_VertexPos, v_LightPos, Light.range, 1.0, 0.0, 25.0 );
	float intensity   = spotLightIntensity( v_VertexPos, v_LightPos, normalize( v_Normal ), v_LightDir, Light.cutoff ) * attenuation;

	#elif F_LightType == 3
	float intensity   = directionalLightIntensity( v_LightDir, normalize( v_Normal ) );
	#endif	/*	F_LightType == 1	*/

	lightColor = vec4( Light.color, 1.0 ) * Light.intensity * intensity;
#endif  /*  F_VertexNormal    */

#if F_ShadowTexture
	lightColor *= shadowFactor( u_ShadowTexture, v_TexCoordShadow, 0.0 );
#endif	/*	F_ShadowTexture	*/

	vec4 finalColor = lightColor * diffuseColor;

F_ShadowTexture		= texture1

[VertexShader]
varying vec4 wsVertex;

#if defined( F_VertexColor )
varying vec4 v_Color;
#endif  /*  F_VertexColor    */
