smallpt: when to stop diffuse ray scattering
p is gonna be zero for light sources. Light sources are defined by emission variable and color is zero for them. Hence the reflectance parameter calculated previous to this line p would be zero giving us obj.e