 // implementation of microfacet occlusion from “An Inexpensive BRDF Model for Physically based Rendering” by Christophe Schlick
 float geometricOcclusionSchlick(PBRInfo pbrInputs)
 {
-  float k = pbrInputs.roughness * 0.79788; // 0.79788 = sqrt(2.0/3.1415);
+  float k = pbrInputs.alpha * 0.79788; // 0.79788 = sqrt(2.0/3.1415);
   // alternately, k can be defined with
   // float k = (pbrInputs.roughness + 1)*(pbrInputs.roughness + 1)/8;
 

// Implementation of diffuse from "Physically-Based Shading at Disney" by Brent Burley
vec3 disneyDiffuse(PBRInfo pbrInputs)
{
  float f90 = 2.*pbrInputs.LdotH*pbrInputs.LdotH*pbrInputs.alphaG - 0.5;

  return (pbrInputs.baseColor/M_PI)*(1.0+f90*pow((1.0-pbrInputs.NdotL),5.0))*(1.0+f90*pow((1.0-pbrInputs.NdotV),5.0));
}

  vec3 baseColor;
  vec3 reflectance0;
  vec3 reflectance90;
  float alpha;
};

const float M_PI = 3.141592653589793;
