[Bf-blender-cvs] [896a333867e] cycles_path_guiding: Cycles: Do not use path guiding in (almost) delta volumes

Sebastian Herholz noreply at git.blender.org
Thu Oct 6 10:43:15 CEST 2022


Commit: 896a333867e04233a1aa7f16f42e2b8fed927608
Author: Sebastian Herholz
Date:   Thu Oct 6 10:41:05 2022 +0200
Branches: cycles_path_guiding
https://developer.blender.org/rB896a333867e04233a1aa7f16f42e2b8fed927608

Cycles: Do not use path guiding in (almost) delta volumes

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

M	intern/cycles/kernel/integrator/guiding.h

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

diff --git a/intern/cycles/kernel/integrator/guiding.h b/intern/cycles/kernel/integrator/guiding.h
index 5904b69b046..634bba2a9b4 100644
--- a/intern/cycles/kernel/integrator/guiding.h
+++ b/intern/cycles/kernel/integrator/guiding.h
@@ -501,6 +501,11 @@ ccl_device_forceinline bool guiding_phase_init(KernelGlobals kg,
                                                ccl_private float &rand)
 {
 #if defined(__PATH_GUIDING__) && PATH_GUIDING_LEVEL >= 4
+  /* we do not need to guide almost delta phase functions */
+  if (fabsf(g) >= 0.99f) {
+    return false;
+  }
+
   if (kg->opgl_volume_sampling_distribution->Init(
           kg->opgl_guiding_field, guiding_point3f(P), rand, true)) {
     kg->opgl_volume_sampling_distribution->ApplySingleLobeHenyeyGreensteinProduct(guiding_vec3f(D),



More information about the Bf-blender-cvs mailing list