From 4c287f1d4dcdef959368de4dca9b1e5d7244b5f7 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 20 Feb 2013 12:10:05 +0000 Subject: [PATCH] Fix shadow pass issue with non-progressive render shadow pass with emitting meshes and world MIS. --- intern/cycles/render/light.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp index ccc6c5142bd..47e9dd8e7f5 100644 --- a/intern/cycles/render/light.cpp +++ b/intern/cycles/render/light.cpp @@ -360,10 +360,10 @@ void LightManager::device_update_distribution(Device *device, DeviceScene *dscen /* bit of an ugly hack to compensate for emitting triangles influencing * amount of samples we get for this pass */ - if(scene->integrator->progressive && kintegrator->pdf_triangles != 0.0f) - kfilm->pass_shadow_scale = 0.5f; - else - kfilm->pass_shadow_scale = 1.0f; + kfilm->pass_shadow_scale = 1.0f; + + if(kintegrator->pdf_triangles != 0.0f) + kfilm->pass_shadow_scale *= 0.5f; if(num_background_lights < num_lights) kfilm->pass_shadow_scale *= (float)(num_lights - num_background_lights)/(float)num_lights;