         // directional).
 	L = normalize(light_position_in.xyz - light_position_in.w * position_world_var);
 #endif
-	// Calculate the half vector.
+#ifdef USE_REFLECTION_VECTOR
+        MEDIUMP vec3 R;
+#else	
+	// Calculate the halfway vector.
 	MEDIUMP vec3 H = normalize(V + L);
+#endif
 
 	MEDIUMP vec3 normal;
 	// Save normalized light direction in case it is needed later, before light vectors

		poisson_factor);
}

#endif

void main() {

#else
		c += light_att * light_color * diffuse_base_color * NdotL;
#endif
#ifdef USE_REFLECTION_VECTOR
		LOWP float RdotV = max(dot(R, V), 0.0);
#else
		LOWP float NdotH = max(dot(normal, H), 0.0);
#endif
		LOWP vec3 specular_map_color;
#ifdef SPECULARITY_MAP_FIXED
		specular_map_color = texture2D(specular_map_in, texcoord_var).rgb;
