One more thing. (Sorry, I haven't thought about this stuff for a while, so it's all coming back to me in pieces.) Your method *could* be made to work, by adjusting the pdf like so: you start with the uniform cone PDF based on the projected interior solid angle, then convert to a PDF over the visible surface, then convert to a PDF based on projected solid angle from the exterior point. This is better than sampling the whole sphere because you avoid wasting effort on the non-visible parts, but it's worse than methods that sample with respect to projected solid angle from the exterior point, because most of the time the lighting integral is with respect to projected solid angle from the exterior point, so sampling with a distribution different from that introduces more variance. (The Shirley/Wang paper from my original post talks about this a bit.)

There is a disk with the radius from the sphere and his center is the same as the sphere. The normal from the disc shows to the point, that you want to illuminate (hitpoint). You sample than the disc and shoot a shadow-ray from the hitpoint to the sampled disc-point.

XMAMan wrote:There is a disk with the radius from the sphere and his center is the same as the sphere. The normal from the disc shows to the point, that you want to illuminate (hitpoint). You sample than the disc and shoot a shadow-ray from the hitpoint to the sampled disc-point.

It probably gives decent-looking results, but the accuracy breaks down as the light source becomes large and/or close to the illuminated point. Imagine that the surface of the sphere is very close to the hit point. In the limit, the sphere becomes the only thing visible in the entire hemisphere over the hit point (i.e., it subtends a cone where the surface approaches 90 degrees from the axis). A disk in the same configuration would only subtend a 45-degree cone. Also, I'm not sure about the sampling density. It's not uniform disc sampling (picking more points closer to the center), but uniform sampling would give an angular density that is higher closer to the edge of the disk. Do these two cancel out?

You're sampling the radius with a linear distribution, but that's not a uniform density across the disk. For a unit disk, r2 in the range [0, 0.5) covers an area of pi / 4 (pi * 0.5^2), but r2 in the range[0.5, 1) covers an area of 3 * pi / 4 (pi * 1^2 - pi * 0.5^2).

Also, the terms don't cancel out. If you had a very large disc that was very close to your hitpoint (a situation that might not be relevant for a spherical luminaire, but useful for checking a disk-shaped luminaire), almost all of the sampled points would be at the "horizon", as seen from the hit point, and almost none would be "overhead".

How would one go about importance sampling the sphere with respect to projected solid angle instead of just the solid angle,in order to importance sample the product of both the lambertian brdf and a spherical light source?