 }
 #endif
 
+#ifdef VARIANCE_SHADOW_MAPPING
+vec2 fixMomments()
+{
+	vec2 result;
+	return result;
+}
+
+float varianceShadowMapping()
+{
+	return 1.0;
+}
+#endif
+
 void main() {
+	vec3 color;
+	float shadowFactor = 1.0;
 	vec3 emissive = uEmissive;
 	vec3 diffuse = vec3(0.0, 0.0, 0.0);
 	vec3 specular = vec3(0.0, 0.0, 0.0);

#endif

#ifdef EMISSIVE_MAP
  emissive *= vec3(texture2D(uEmissiveSampler, vUv));
#endif

#ifdef DIFFUSE_MAP
	diffuse *= texture2D(uDiffuseSampler, vUv, 0.0).rgb;
#endif

#ifdef SPECULAR_MAP
	specular *= vec3(texture2D(uSpecularSampler, vUv));
#endif

#ifdef REFLECTION

#ifdef NORMAL_MAP
uniform sampler2D uNormalSampler;

vec3 pertubNormal(vec3 v)
{
	vec3 q0 = dFdx(v);
	vec3 q1 = dFdy(v);

