 
 	light_uv_interp.xy = (light_matrix * outvec).xy;
 	light_uv_interp.zw =(light_local_matrix * outvec).xy;
+
+	mat3 inverse_light_matrix = mat3(inverse(light_matrix));
+	inverse_light_matrix[0] = normalize(inverse_light_matrix[0]);
+	inverse_light_matrix[1] = normalize(inverse_light_matrix[1]);
+	inverse_light_matrix[2] = normalize(inverse_light_matrix[2]);
+	transformed_light_uv = (inverse_light_matrix * vec3(light_uv_interp.zw,0.0)).xy; //for normal mapping
+
 #ifdef USE_SHADOWS
 	pos=outvec.xy;
 #endif


uniform lowp sampler2D light_texture; // texunit:-1
in vec4 light_uv_interp;


in vec4 local_rot;



out vec4 light_uv_interp;
out vec2 transformed_light_uv;


out vec4 local_rot;
