     return (2.0 + invR) * pow(sin2h, invR * 0.5) / (2.0 * MATH_PI);
 }
 
-
 float PDF(vec3 H, vec3 N, float roughness)
 {
     float NdotH = dot(N, H);

	else if(u_distribution == cGGX)
	{
		float D = D_GGX(NdotH, roughness);
		return max(D * NdotH / (4.0 * NdotH), 0.0);
	}
	else if(u_distribution == cCharlie)
	{
		float D = D_Charlie(roughness, NdotH);
		return max(D * NdotH / abs(4.0 * NdotH), 0.0);
	}

	return 0.f;

		{
			float lod = 0.0;

			if (u_roughness > 0.0)
			{
				// Mipmap Filtered Samples
				// see https://github.com/derkreature/IBLBaker
