 in INTERFACE {
 	vec2 uv;
 } In ;
+
+#define INV_M_PI 0.3183098862
+#define M_PI 3.1415926536
 
 // Uniforms
 uniform sampler2D albedoTexture;

	return probabilityMax;
}


void main(){
	
	vec4 albedo =  texture(albedoTexture,In.uv);
	// If this is the skybox, don't shade.
	if(albedo.a == 0.0){
		discard;
	}
	
	vec3 diffuseColor = albedo.rgb;
	vec3 n = 2.0 * texture(normalTexture,In.uv).rgb - 1.0;
	float depth = texture(depthTexture,In.uv).r;
	float specularCoeff = texture(effectsTexture,In.uv).g;
	vec3 position = positionFromDepth(depth);
	vec3 v = normalize(-position);
	
	vec3 lightShading = shading(diffuseColor, n, v, specularCoeff);
	
	vec3 lightSpacePosition = 0.5*(viewToLight * vec4(position,1.0)).xyz + 0.5;
	float shadowMultiplicator = shadow(lightSpacePosition);
	
	fragColor.rgb = vec3(0.0);//shadowMultiplicator*lightShading;
}


}


// Compute the shadow multiplicator based on shadow map.

float shadow(vec3 lightSpacePosition){
