 	float shadowFactor = ShadowCalculation(passFromVertex.fragPosLightSpace);
 	tempColor = vec4((ambient + (1.0 - shadowFactor) * (diffuse + specular)), 1.0f) * tempColor;
 	
+	// Add Fog if blocks are far enough
+	float dist = distance(viewPos, vec3(passFromVertex.fragPos));
+	const float fogRenderMinDist = 100;
+	if(dist > fogRenderMinDist)
+		tempColor = FogCalculation(tempColor, dist - fogRenderMinDist, viewDir);
 
-	finalColor = clamp(tempColor, 0.0, 1.0);
+	finalColor =  clamp(tempColor, 0.0, 1.0);
 }

	return shadow;
}

void main() {

	vec4 tempColor = texture(tilesheet, vec3(passFromVertex.UvCoords.x, passFromVertex.UvCoords.y, passFromVertex.faceIndex));

	vec3 specular = vec3(0.0, 0.0, 0.0);
	
	// Should not add a specular component when the diffuse dot product is 0
	vec3 viewDir = normalize(viewPos - vec3(passFromVertex.fragPos));
	if (diff != 0.0) {
		vec3 reflectDir = reflect(-lightDirection, passFromVertex.normal);
		float spec = pow(max(dot(viewDir, reflectDir), 0.0), shininess);
		specular = specularCoefficient * spec * lightColor;
