Closed zq317157782 closed 6 years ago
I think there is no problem with the code. I suggest going into the details on page 891-894 and also page 901-903, pbrt v3.
When a ray hits a surface and the ray is in a medium, we need to sample a MediumInteraction. In medium->Sample, we only account for sample the distance. If we successfully sample a MediumInteraction(mi.IsValid() is true), the direct illumination, including phase function and pdf, are handled mainly by UniformSampleOneLight() in
Thanks!
I'm reading the VolPathIntegrator and around line 79:
if (ray.medium) beta *= ray.medium->Sample(ray, sampler, arena, &mi);
but I found there is no PhaseFunc's value and it's PDF here ,is it implicitly included here?Just because PhaseFunc div PDF equals one? I'm confused at here. Thanks.