     // the distribution (e.g. lambertian uses a cosine importance)
     if(u_distribution == cLambertian)
     {
-        // Cosine weighted hemisphere sampling
-        // http://www.pbr-book.org/3ed-2018/Monte_Carlo_Integration/2D_Sampling_with_Multidimensional_Transformations.html#Cosine-WeightedHemisphereSampling
-        cosTheta = sqrt(1.0 - xi.y);
-        sinTheta = sqrt(xi.y); // equivalent to `sqrt(1.0 - cosTheta*cosTheta)`;
-        phi = 2.0 * MATH_PI * xi.x;
-
-        pdf = cosTheta / MATH_PI; // evaluation for solid angle, therefore drop the sinTheta
+        MicrofacetDistributionSample lambertian = Lambertian(xi, roughness);
+        cosTheta = lambertian.cosTheta;
+        sinTheta = lambertian.sinTheta;
+        phi = lambertian.phi;
+        pdf = lambertian.pdf;
     }
     else if(u_distribution == cGGX)
     {

    ggx.phi = 2.0 * MATH_PI * xi.x;

    // evaluate GGX pdf (for half vector)
    ggx.pdf  = D_GGX(ggx.cosTheta, alpha);

    // Apply the Jacobian to obtain a pdf that is parameterized by l
    // see https://bruop.github.io/ibl/

    return (2.0 + invR) * pow(sin2h, invR * 0.5) / (2.0 * MATH_PI);
}


MicrofacetDistributionSample Charlie(vec2 xi, float roughness)
{
    MicrofacetDistributionSample charlie;
