 
 vec3 applyDirectionalLight(Light light, MaterialInfo materialInfo, vec3 n, vec3 v)
 {
-    return applyGeneralLight(light.intensity, light.color, light.direction, materialInfo, n, v);
+    vec3 pointToLight = -light.direction;
+    return applyGeneralLight(light.intensity, light.color, pointToLight, materialInfo, n, v);
 }
 
 vec3 applyPointLight(Light light, MaterialInfo materialInfo, vec3 n, vec3 v)
 {
-    vec3 direction = light.position - v_Position;
-    float distance = length(direction);
-    direction = normalize(direction);
+    vec3 pointToLight = light.position - v_Position;
+    float distance = length(pointToLight);
     float attenuation = max(min(1.0 - pow(distance / light.range, 4.0), 1.0), 0.0) / pow(distance, 2.0);
 
-    return applyGeneralLight(light.intensity * attenuation, light.color, direction, materialInfo, n, v);
+    return applyGeneralLight(light.intensity * attenuation, light.color, pointToLight, materialInfo, n, v);
 }
 
 vec3 applySpotLight(Light light, MaterialInfo materialInfo, vec3 n, vec3 v)

    );
}

vec3 applyGeneralLight(float intensity, vec3 color, vec3 direction, MaterialInfo materialInfo, vec3 n, vec3 v)
{
    AngularInfo angularInfo = getAngularInfo(direction, n, v);

    // Calculate the shading terms for the microfacet specular shading model
    vec3 F = specularReflection(materialInfo, angularInfo);

    return clamp((-b + sqrt(D)) / (2.0 * a), 0.0, 1.0);
}

AngularInfo getAngularInfo(vec3 pointToLight, vec3 normal, vec3 pointToView)
{
    // Standard one-letter names
    vec3 n = normalize(normal);           // Outward direction of surface point
    vec3 v = normalize(pointToView);      // Direction from surface point to view
    vec3 l = normalize(pointToLight);     // Direction from surface point to light
    vec3 h = normalize(l + v);            // Direction of the vector between l and v

    float NdotL = clamp(dot(n, l), 0.001, 1.0);
    float NdotV = clamp(abs(dot(n, v)), 0.001, 1.0);
