 		discard;
 	}
 	
-	// Get all informationsfrom textures.
-	vec3 albedo = albedoInfo.rgb;
+	// Get all informations from textures.
+	vec3 baseColor = albedoInfo.rgb;
 	float depth = texture(depthTexture,uv).r;
 	vec3 position = positionFromDepth(depth, uv);
 	vec3 infos = texture(effectsTexture,uv).rgb;
+	float roughness = max(0.0001, infos.r);
+	float metallic = infos.g;
 	
 	vec3 n = 2.0 * texture(normalTexture,uv).rgb - 1.0;
 	vec3 v = normalize(-position);

	float attenuation = pow(max(0.0, 1.0 - distance(position,lightPosition)/radius),2);
	
	// BRDF contributions.
	vec3 diffuse = lambert();
	vec3 specular = ggx();
	
	fragColor.rgb = attenuation * orientation * (diffuse + specular) * lightColor;

#version 330

#define INV_M_PI 0.3183098862
// Uniforms
uniform sampler2D albedoTexture;
uniform sampler2D normalTexture;
