Skip to content

Commit

Permalink
Fixed a problem with infinite lights, BiDir and shadow transparent ma…
Browse files Browse the repository at this point in the history
…terials
  • Loading branch information
Dade916 committed May 29, 2022
1 parent 93280d3 commit 9b35fd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions release-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
* Workaround to broken NumPy included in Blender v3.0
* Introduced Scene:DeleteObjects() and Scene::DeleteLights() methods
* Optimized Scene:DeleteObjects() method
* Fixed a problem with infinite lights, BiDir and shadow transparent materials

Check https://wiki.luxcorerender.org/LuxCoreRender_Release_Notes for the full list
of release notes.
Expand Down
4 changes: 3 additions & 1 deletion src/slg/engines/bidircpu/bidircputhread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,9 @@ void BiDirCPURenderThread::DirectLightSampling(const float time,
const float weightLight = MIS(bsdfPdfW / directLightSamplingPdfW);
const float weightCamera = MIS(emissionPdfW * cosThetaToLight / (directPdfW * cosThetaAtLight)) *
(misVmWeightFactor + eyeVertex.dVCM + eyeVertex.dVC * MIS(bsdfRevPdfW));
const float misWeight = 1.f / (weightLight + 1.f + weightCamera);
// Disable MIS if we have gone trough a shadow transparent object
const float misWeight = shadowBsdf.hitPoint.throughShadowTransparency ?
1.f : (1.f / (weightLight + 1.f + weightCamera));

// Was:
// const float factor = cosThetaToLight / directLightSamplingPdfW;
Expand Down

0 comments on commit 9b35fd1

Please sign in to comment.