[Bf-blender-cvs] [52b7b219af3] cycles_path_guiding: Guiding: Some code cleanup

Sebastian Herholz noreply at git.blender.org
Tue Sep 6 20:07:56 CEST 2022


Commit: 52b7b219af39f1a0253347ff88dc4af8adb62664
Author: Sebastian Herholz
Date:   Tue Sep 6 19:41:13 2022 +0200
Branches: cycles_path_guiding
https://developer.blender.org/rB52b7b219af39f1a0253347ff88dc4af8adb62664

Guiding: Some code cleanup

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

M	intern/cycles/blender/addon/properties.py
M	intern/cycles/kernel/data_template.h
M	intern/cycles/kernel/integrator/surface_shader.h

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

diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index a5591047d88..22f8ee10017 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -517,7 +517,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
         name="Guiding",
         description="Use path guiding for sampling paths. Path guiding incrementally "
         "learns the light distribution of the scene and guides path into directions "
-        "with high direct and indirect light contributions.",
+        "with high direct and indirect light contributions",
         default=False,
     )
 
diff --git a/intern/cycles/kernel/data_template.h b/intern/cycles/kernel/data_template.h
index 589d7e8db8e..36b96875571 100644
--- a/intern/cycles/kernel/data_template.h
+++ b/intern/cycles/kernel/data_template.h
@@ -195,23 +195,19 @@ KERNEL_STRUCT_MEMBER(integrator, int, filter_closures)
 /* MIS debugging. */
 KERNEL_STRUCT_MEMBER(integrator, int, direct_light_sampling_type)
 
-#if 1
 /* Path Guiding */
 KERNEL_STRUCT_MEMBER(integrator, float, surface_guiding_probability)
 KERNEL_STRUCT_MEMBER(integrator, float, volume_guiding_probability)
-KERNEL_STRUCT_MEMBER(integrator, GuidingDistributionType, guiding_distribution_type)
+KERNEL_STRUCT_MEMBER(integrator, int, guiding_distribution_type)
 KERNEL_STRUCT_MEMBER(integrator, bool, use_guiding)
 KERNEL_STRUCT_MEMBER(integrator, bool, use_surface_guiding)
 KERNEL_STRUCT_MEMBER(integrator, bool, use_volume_guiding)
 KERNEL_STRUCT_MEMBER(integrator, bool, use_guide_direct_light)
 KERNEL_STRUCT_MEMBER(integrator, bool, use_mis_weights)
+/* Padding */
 KERNEL_STRUCT_MEMBER(integrator, bool, pad1)
 KERNEL_STRUCT_MEMBER(integrator, bool, pad2)
 KERNEL_STRUCT_MEMBER(integrator, bool, pad3)
-#else
-/* Padding */
-KERNEL_STRUCT_MEMBER(integrator, int, pad1)
-#endif
 KERNEL_STRUCT_END(KernelIntegrator)
 
 /* SVM. For shader specialization. */
diff --git a/intern/cycles/kernel/integrator/surface_shader.h b/intern/cycles/kernel/integrator/surface_shader.h
index 0bc827fc06e..b604324c6ad 100644
--- a/intern/cycles/kernel/integrator/surface_shader.h
+++ b/intern/cycles/kernel/integrator/surface_shader.h
@@ -297,32 +297,6 @@ ccl_device_inline float surface_shader_bsdf_eval_pdfs(const KernelGlobals kg,
   return (sum_sample_weight > 0.0f) ? sum_pdf / sum_sample_weight : 0.0f;
 }
 
-/*
-ccl_device_inline float _surface_shader_bsdf_single_eval(const KernelGlobals *kg,
-                                                         ShaderData *sd,
-                                                         const ShaderClosure *sc,
-                                                         const float3 omega_in,
-                                                         const bool is_transmission,
-                                                         BsdfEval *result_eval,
-                                                         const uint light_shader_flags)
-{
-  float bsdf_pdf = 0.0f;
-  if (CLOSURE_IS_BSDF_OR_BSSRDF(sc->type)) {
-    if (CLOSURE_IS_BSDF(sc->type) && !_surface_shader_exclude(sc->type, light_shader_flags)) {
-
-      Spectrum eval = bsdf_eval(kg, sd, sc, omega_in, is_transmission, &bsdf_pdf);
-
-      if (bsdf_pdf != 0.0f) {
-        const bool is_diffuse = (CLOSURE_IS_BSDF_DIFFUSE(sc->type) ||
-                                  CLOSURE_IS_BSDF_BSSRDF(sc->type));
-        bsdf_eval_accum(result_eval, is_diffuse, eval * sc->weight, 1.0f);
-      }
-    }
-  }
-  return (bsdf_pdf > 0.0f) ? bsdf_pdf : 0.0f;
-}
-*/
-
 #ifndef __KERNEL_CUDA__
 ccl_device
 #else



More information about the Bf-blender-cvs mailing list