Cycles: Fix access uninitialized light after recent refactor/fixes
This commit is contained in:
parent
76eac1ae70
commit
578f70f288
Notes:
blender-bot
2023-02-14 08:25:14 +01:00
Referenced by issue #47388, smoke render viewport vs final render Referenced by issue #47366, New Curve interpolation in Color Management works as the old method unless it gets reset. Referenced by issue #47353, texture paint grid bug Referenced by issue #47356, Possible errors introduced in the new SSS implementation (in the days after it was committed)
|
@ -206,7 +206,7 @@ void LightManager::device_update_distribution(Device *device, DeviceScene *dscen
|
|||
bool background_mis = false;
|
||||
|
||||
foreach(Light *light, scene->lights) {
|
||||
if(light->has_contribution(scene))
|
||||
if(light->is_enabled)
|
||||
num_lights++;
|
||||
}
|
||||
|
||||
|
@ -345,7 +345,7 @@ void LightManager::device_update_distribution(Device *device, DeviceScene *dscen
|
|||
|
||||
int light_index = 0;
|
||||
foreach(Light *light, scene->lights) {
|
||||
if(!light->has_contribution(scene))
|
||||
if(!light->is_enabled)
|
||||
continue;
|
||||
|
||||
distribution[offset].x = totarea;
|
||||
|
|
Loading…
Reference in New Issue