diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-11-07 05:28:10 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-11-08 00:35:12 +0300 |
commit | e74b2293422b91f8c8de8d76fcbb5241caaa7a6b (patch) | |
tree | 6666a088d7f62d48cfe741f335b56127178c57e7 /intern/cycles/render | |
parent | 5f2be40658a29b44f66db6369409ac4460d2ea9e (diff) |
Fix incorrect MIS weights in Cycles with multiple lights.
This causes some difference in the classroom scene, where ray visibility
tricks are used and break the MIS balance. Otherwise there doesn't seem
to be much effect, but better to use the right formulas. Problem originally
identified by Lukas.
Diffstat (limited to 'intern/cycles/render')
-rw-r--r-- | intern/cycles/render/light.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp index d353709647d..b37a0768b53 100644 --- a/intern/cycles/render/light.cpp +++ b/intern/cycles/render/light.cpp @@ -414,7 +414,6 @@ void LightManager::device_update_distribution(Device *, DeviceScene *dscene, Sce /* precompute pdfs */ kintegrator->pdf_triangles = 0.0f; kintegrator->pdf_lights = 0.0f; - kintegrator->inv_pdf_lights = 0.0f; /* sample one, with 0.5 probability of light or triangle */ kintegrator->num_all_lights = num_lights; @@ -429,8 +428,6 @@ void LightManager::device_update_distribution(Device *, DeviceScene *dscene, Sce kintegrator->pdf_lights = 1.0f/num_lights; if(trianglearea > 0.0f) kintegrator->pdf_lights *= 0.5f; - - kintegrator->inv_pdf_lights = 1.0f/kintegrator->pdf_lights; } kintegrator->use_lamp_mis = use_lamp_mis; @@ -467,7 +464,6 @@ void LightManager::device_update_distribution(Device *, DeviceScene *dscene, Sce kintegrator->num_all_lights = 0; kintegrator->pdf_triangles = 0.0f; kintegrator->pdf_lights = 0.0f; - kintegrator->inv_pdf_lights = 0.0f; kintegrator->use_lamp_mis = false; kintegrator->num_portals = 0; kintegrator->portal_offset = 0; |