I originally wrote a pathtracer that just bounces by the BRDF and each sample is added to a buffer that divides by the current number of frames.Now I'd like to do next event estimation at each bounce, directly sampling the light along the path. How do I weight the samples taken with regular pathtracing along with the direct light samples? Even if I weight the direct light by the solid angle of the light, if I have more than 1 sample taken I can no longer just divide by the frame count right?
Path weight for direct light sampling
raytracing;pathtracing;importance sampling