Skip to content

Commit

Permalink
Fixed a problem in BIDIRCPU with camera PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
Dade916 committed Jun 10, 2019
1 parent 4327166 commit 8e3e8b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions release-notes.txt
Expand Up @@ -79,6 +79,7 @@
* Fixed the access to an uninitialized variable in ProjectionLight::Preprocess()
* Fixed a crash when trying to render a scene without light sources with PATHOCL (issue #202)
* Fixed DLSC to work with Front and back material transparency (aka light invisible object)
* Fixed a problem in BIDIRCPU with camera PDF

Check https://wiki.luxcorerender.org/LuxCoreRender_Release_Notes for the full list
of release notes.
Expand Down
7 changes: 1 addition & 6 deletions src/slg/engines/bidircpu/bidircputhread.cpp
Expand Up @@ -189,12 +189,7 @@ void BiDirCPURenderThread::ConnectToEye(const float time,
const float cosToCamera = Dot(lightVertex.bsdf.hitPoint.shadeN, -eyeDir);
const float cameraPdfW = scene->camera->GetPDF(eyeDir, filmX, filmY);
const float cameraPdfA = PdfWtoA(cameraPdfW, eyeDistance, cosToCamera);
// Was:
// const float fluxToRadianceFactor = cameraPdfA;
//
// but now BSDF::Evaluate() follows LuxRender habit to return the
// result multiplied by cosThetaToLight
const float fluxToRadianceFactor = cameraPdfW / (eyeDistance * eyeDistance);
const float fluxToRadianceFactor = cameraPdfA;

const float weightLight = MIS(cameraPdfA) *
(misVmWeightFactor + lightVertex.dVCM + lightVertex.dVC * MIS(bsdfRevPdfW));
Expand Down

0 comments on commit 8e3e8b7

Please sign in to comment.