 
     // Calculate lighting contribution from image based lighting source (IBL)
 #ifdef USE_IBL
-    //vec3 specularColor = materialInfo.f0;
     vec3 specularColor = getThinFilmSpecularColor(materialInfo.f0, materialInfo.f90, normal, view, materialInfo.thinFilmFactor, materialInfo.thinFilmThickness);
-
-    //g_finalColor.rgb = specularColor;
-    //return;
-
     f_specular += getGGXIBLContribution(normal, view, materialInfo.perceptualRoughness, specularColor);
     f_diffuse += getLambertianIBLContribution(normal, materialInfo.albedoColor);
 

MaterialInfo getThinFilmInfo(MaterialInfo info)
{
    info.thinFilmFactor = u_ThinFilmFactor;
    info.thinFilmThicknessMinimum = u_ThinFilmThicknessMinimum;
    info.thinFilmThicknessMaximum = u_ThinFilmThicknessMaximum;
    info.thinFilmThickness = u_ThinFilmThicknessMaximum;

    #ifdef HAS_THIN_FILM_MAP
        info.thinFilmFactor *= texture(u_ThinFilmSampler, getThinFilmUV()).r;
    #endif

    #ifdef HAS_THIN_FILM_THICKNESS_MAP
        float thicknessSampled /* [0, 1] */ = texture(u_ThinFilmThicknessSampler, getThinFilmThicknessUV()).r;
        float thickness /* [t_min / 1200, t_max / 1200] */ =
            (thicknessSampled * (u_ThinFilmThicknessMaximum - u_ThinFilmThicknessMinimum) + u_ThinFilmThicknessMinimum) / 1200.0;
        info.thinFilmThickness = thickness;

    if (thinFilmFactor == 0.0)
    {
        // No thin film applied.
        return F;
    }

