     vec3 view = normalize(u_Camera - v_Position);
 
     materialInfo.normal = normal;
+
+#ifdef MATERIAL_THIN_FILM
+    materialInfo.f0 = getThinFilmF0(materialInfo.f0, materialInfo.f90, clampedDot(normal, view),
+        materialInfo.thinFilmFactor, materialInfo.thinFilmThickness);
+#endif
 
     // LIGHTING
     vec3 f_specular = vec3(0.0);


    // Calculate lighting contribution from image based lighting source (IBL)
#ifdef USE_IBL
    vec3 specularColor = getThinFilmSpecularColor(materialInfo.f0, materialInfo.f90, clampedDot(normal, view), materialInfo.thinFilmFactor, materialInfo.thinFilmThickness);

    f_specular += getIBLRadianceGGX(normal, view, materialInfo.perceptualRoughness, specularColor);
    f_diffuse += getIBLRadianceLambertian(normal, materialInfo.albedoColor);

    #ifdef MATERIAL_CLEARCOAT

}
#endif

vec3 getThinFilmF0(vec3 f0, vec3 f90, float NdotV, float thinFilmFactor, float thinFilmThickness)
{
    if (thinFilmFactor == 0.0)
    {
        // No thin film applied.
        return f0;
    }

    vec3 lutSample = texture(u_ThinFilmLUT, vec2(thinFilmThickness, NdotV)).rgb - 0.5;
    vec3 intensity = thinFilmFactor * 4.0 * f0 * (1.0 - f0);
    return clamp(intensity * lutSample, 0.0, 1.0);
}

#ifdef MATERIAL_THIN_FILM
MaterialInfo getThinFilmInfo(MaterialInfo info)
{
