[Bf-blender-cvs] [f56488c20f4] master: Fix Cycles ellipse area light returns zero pdf in volume segment

Weizhen Huang noreply at git.blender.org
Mon Dec 12 21:40:06 CET 2022


Commit: f56488c20f44acaf31d75ba0a1e5dd2539c8f8a6
Author: Weizhen Huang
Date:   Mon Dec 12 21:38:23 2022 +0100
Branches: master
https://developer.blender.org/rBf56488c20f44acaf31d75ba0a1e5dd2539c8f8a6

Fix Cycles ellipse area light returns zero pdf in volume segment

===================================================================

M	intern/cycles/kernel/light/light.h

===================================================================

diff --git a/intern/cycles/kernel/light/light.h b/intern/cycles/kernel/light/light.h
index d04bffe8f8b..fe1df22bd60 100644
--- a/intern/cycles/kernel/light/light.h
+++ b/intern/cycles/kernel/light/light.h
@@ -156,7 +156,7 @@ ccl_device_noinline bool light_sample(KernelGlobals kg,
   }
 
   ls->pdf *= ls->pdf_selection;
-  return (ls->pdf > 0.0f);
+  return in_volume_segment || (ls->pdf > 0.0f);
 }
 
 /* Intersect ray with individual light. */



More information about the Bf-blender-cvs mailing list