 vec3 lambertianBRDF(vec3 f0, vec3 f90, vec3 diffuseColor, float VdotH)
 {
     // see https://seblagarde.wordpress.com/2012/01/08/pi-or-not-to-pi-in-game-lighting-equation/
-    return (1.0 - fresnel(f0, f90, VdotH)) * (diffuseColor / M_PI);
+    return (1.0 - F_Schlick(f0, f90, VdotH)) * (diffuseColor / M_PI);
 }
 
 //  https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#acknowledgments AppendixB
 vec3 metallicBRDF (vec3 f0, vec3 f90, float alphaRoughness, float VdotH, float NdotL, float NdotV, float NdotH)
 {
-    vec3 F = fresnel(f0, f90, VdotH);
+    vec3 F = F_Schlick(f0, f90, VdotH);
     float Vis = V_GGX(NdotL, NdotV, alphaRoughness);
     float D = D_GGX(NdotH, alphaRoughness);
 

vec3 sheenBRDF(vec3 sheenColor, float sheenIntensity, float sheenRoughness, float NdotL, float NdotV, float NdotH)
{
    float sheenDistribution = D_Charlie(sheenRoughness, NdotH);
    float sheenVisibility = V_Neubelt(NdotL, NdotV);
    return sheenColor * sheenIntensity * sheenDistribution * sheenVisibility * M_PI;
}


    return baseColor * getVertexColor();
}

//
// Fresnel
//
// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html
// https://github.com/wdas/brdf/tree/master/src/brdfs
// https://google.github.io/filament/Filament.md.html
//

vec3 F_None(vec3 f0, vec3 f90, float VdotH)
{
	return f0;
}

// The following equation models the Fresnel reflectance term of the spec equation (aka F())
// Implementation of fresnel from [4], Equation 15
vec3 F_Schlick(vec3 f0, vec3 f90, float VdotH)
{
    return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);
}

vec3 F_CookTorrance(vec3 f0, vec3 f90, float VdotH)
{
	vec3 f0_sqrt = sqrt(f0);
    vec3 ior = (1.0 + f0_sqrt) / (1.0 - f0_sqrt);
	vec3 c = vec3(VdotH);
	vec3 g = sqrt(ior*ior + c*c - 1.0);
    return 0.5 * pow(g-c, vec3(2.0)) / pow(g+c, vec3(2.0)) * (1.0 + pow(c*(g+c) - 1.0, vec3(2.0)) / pow(c*(g-c) + 1.0, vec3(2.0)));	
}

// Smith Joint GGX
