mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix #123448: Cycles area light using MIS when the spread is zero
area light with zero spread was introduced in bf18032977. Such paths can
only be sampled with NEE, so MIS should not be used.
This fixes the discrepancy when Direct Light Sampling is set to MIS or NEE.
Pull Request: #118584
This commit is contained in:
parent
33785d4760
commit
5da75183d9
2 changed files with 3 additions and 2 deletions
|
|
@ -1091,8 +1091,9 @@ void LightManager::device_update_lights(Device *device, DeviceScene *dscene, Sce
|
|||
|
||||
dir = safe_normalize(dir);
|
||||
|
||||
if (light->use_mis && area != 0.0f)
|
||||
if (light->use_mis && area != 0.0f && light->spread > 0.0f) {
|
||||
shader_id |= SHADER_USE_MIS;
|
||||
}
|
||||
|
||||
klights[light_index].co = co;
|
||||
klights[light_index].area.axis_u = axis_u;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit bf6ab57c929adad75e644e8704ade329801a6eb5
|
||||
Subproject commit 11b9163ed6c161e6b996d975f6184901e56e064f
|
||||
Loading…
Add table
Add a link
Reference in a new issue