if (n == 5)
sum += IntegrateEdge(L4, L[0]);
sum *= INV_TWO_PI; // Normalization of the Lambertian integral over the sphere
sum *= INV_TWO_PI; // Normalization of the integral of cosine over the sphere
return twoSided ? abs(sum) : max(sum, 0.0);
}