Commit e211ba42 authored by Matt Pharr's avatar Matt Pharr

Fix arguments passed to Pdf_Le() in BDPT integrator.

Time is the 4th argument, no the third (which is max t).
parent 23ba8033
......@@ -384,7 +384,7 @@ struct Vertex {
// Compute sampling density for non-infinite light sources
Float pdfPos, pdfDir;
light->Pdf_Le(Ray(p(), w, time()), ng(), &pdfPos, &pdfDir);
light->Pdf_Le(Ray(p(), w, Infinity, time()), ng(), &pdfPos, &pdfDir);
pdf = pdfDir * invDist2;
}
if (v.IsOnSurface()) pdf *= AbsDot(v.ng(), w);
......@@ -417,7 +417,7 @@ struct Vertex {
size_t index = lightToDistrIndex.find(light)->second;
pdfChoice = lightDistr.DiscretePDF(index);
light->Pdf_Le(Ray(p(), w, time()), ng(), &pdfPos, &pdfDir);
light->Pdf_Le(Ray(p(), w, Infinity, time()), ng(), &pdfPos, &pdfDir);
return pdfPos * pdfChoice;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment