     // Anything less than 2% is physically impossible and is instead considered to be shadowing. Compare to "Real-Time-Rendering" 4th editon on page 325.
     materialInfo.f90 = vec3(clamp(reflectance * 50.0, 0.0, 1.0));
 
-    materialInfo.normal = normal;
+    materialInfo.n = n;
 
 #ifdef MATERIAL_THIN_FILM
-    materialInfo.f0 = getThinFilmF0(materialInfo.f0, materialInfo.f90, clampedDot(normal, view),
+    materialInfo.f0 = getThinFilmF0(materialInfo.f0, materialInfo.f90, clampedDot(n, v),
         materialInfo.thinFilmFactor, materialInfo.thinFilmThickness);
 #endif
 


    #ifdef MATERIAL_CLEARCOAT
        clearcoatFactor = materialInfo.clearcoatFactor;
        clearcoatFresnel = F_Schlick(materialInfo.clearcoatF0, materialInfo.clearcoatF90, clampedDot(materialInfo.clearcoatNormal, view));
    #endif

    #ifdef MATERIAL_ABSORPTION
        f_transmission *= transmissionAbsorption(view, normal, ior, materialInfo.thickness, materialInfo.absorption);
    #endif

    #ifdef MATERIAL_TRANSMISSION


        vec3 l = normalize(pointToLight);
        vec3 intensity = rangeAttenuation * spotAttenuation * light.intensity * light.color;
        AngularInfo angularInfo = getAngularInfo(pointToLight, materialInfo.n, v);

        if (angularInfo.NdotL > 0.0 || angularInfo.NdotV > 0.0)
        {
