[Bf-blender-cvs] [79b892cdaa4] cycles-x: Fix Cycles X crash in volume scatter without lights
Sergey Sharybin
noreply at git.blender.org
Wed Aug 18 17:00:53 CEST 2021
Commit: 79b892cdaa4988982c942cdb5c00038685affd57
Author: Sergey Sharybin
Date: Wed Aug 18 14:18:02 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB79b892cdaa4988982c942cdb5c00038685affd57
Fix Cycles X crash in volume scatter without lights
Check whether there is direct light in the scene before picking a light.
Differential Revision: https://developer.blender.org/D12257
===================================================================
M intern/cycles/kernel/integrator/integrator_shade_volume.h
===================================================================
diff --git a/intern/cycles/kernel/integrator/integrator_shade_volume.h b/intern/cycles/kernel/integrator/integrator_shade_volume.h
index b15d472715a..aea8e1f9b78 100644
--- a/intern/cycles/kernel/integrator/integrator_shade_volume.h
+++ b/intern/cycles/kernel/integrator/integrator_shade_volume.h
@@ -671,6 +671,10 @@ ccl_device_forceinline void integrate_volume_direct_light(INTEGRATOR_STATE_ARGS,
{
PROFILING_INIT(kg, PROFILING_SHADE_VOLUME_DIRECT_LIGHT);
+ if (!kernel_data.integrator.use_direct_light) {
+ return;
+ }
+
/* Sample position on the same light again, now from the shading
* point where we scattered.
*
More information about the Bf-blender-cvs
mailing list