Fix crash due to normalize of (0,0,0) vector.
Fix crash due to normalize of (0,0,0) vector.

In Sphere::Sample(), don’t normalize the vector from the reference point
to the sphere center until after checking for whether the point is
inside the sphere.

The SpatialLightDistribution was creating Interactions at the origin
(under a certain set of circumstances) in a scene with a sphere
centered at the origin, which led to an assertion failure.

nyue/pbrt-v3,nyue/pbrt-v3,shihchinw/pbrt-v3,mmp/pbrt-v3,nispaur/pbrt-v3,nispaur/pbrt-v3,mmp/pbrt-v3,mmp/pbrt-v3,shihchinw/pbrt-v3,nyue/pbrt-v3,shihchinw/pbrt-v3,mmp/pbrt-v3,shihchinw/pbrt-v3,nispaur/pbrt-v3,nyue/pbrt-v3,nispaur/pbrt-v3