[Bf-blender-cvs] [6b0c235389d] soc-2022-many-lights-sampling: Merge branch 'master' into soc-2022-many-lights-sampling

Weizhen Huang noreply at git.blender.org
Mon Nov 28 12:56:17 CET 2022


Commit: 6b0c235389da85771589663cef16869d8469fafc
Author: Weizhen Huang
Date:   Mon Nov 28 12:56:00 2022 +0100
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rB6b0c235389da85771589663cef16869d8469fafc

Merge branch 'master' into soc-2022-many-lights-sampling

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



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

diff --cc intern/cycles/kernel/data_template.h
index 994e7f7446c,c7b50b20c70..081af4437ad
--- a/intern/cycles/kernel/data_template.h
+++ b/intern/cycles/kernel/data_template.h
@@@ -205,10 -206,11 +206,10 @@@ KERNEL_STRUCT_MEMBER(integrator, int, u
  KERNEL_STRUCT_MEMBER(integrator, int, use_volume_guiding)
  KERNEL_STRUCT_MEMBER(integrator, int, use_guiding_direct_light)
  KERNEL_STRUCT_MEMBER(integrator, int, use_guiding_mis_weights)
- /* Padding */
+ 
+ /* Padding. */
  KERNEL_STRUCT_MEMBER(integrator, int, pad1)
  KERNEL_STRUCT_MEMBER(integrator, int, pad2)
--KERNEL_STRUCT_MEMBER(integrator, int, pad3)
  KERNEL_STRUCT_END(KernelIntegrator)
  
  /* SVM. For shader specialization. */
diff --cc intern/cycles/kernel/integrator/shade_volume.h
index 6889e01f517,46d13f59c6a..a23efd5738b
--- a/intern/cycles/kernel/integrator/shade_volume.h
+++ b/intern/cycles/kernel/integrator/shade_volume.h
@@@ -697,18 -702,10 +703,18 @@@ ccl_device_forceinline bool integrate_v
    /* Sample position on a light. */
    const uint32_t path_flag = INTEGRATOR_STATE(state, path, flag);
    const uint bounce = INTEGRATOR_STATE(state, path, bounce);
-   float2 rand_light = path_state_rng_2D(kg, rng_state, PRNG_VOLUME_SEGMENT_LIGHT);
+   const float2 rand_light = path_state_rng_2D(kg, rng_state, PRNG_LIGHT);
  
 -  if (!light_distribution_sample_from_volume_segment(
 -          kg, rand_light.x, rand_light.y, sd->time, sd->P, bounce, path_flag, ls)) {
 +  if (!light_sample_from_volume_segment(kg,
 +                                        rand_light.x,
 +                                        rand_light.y,
 +                                        sd->time,
 +                                        sd->P,
 +                                        ray->D,
 +                                        ray->tmax - ray->tmin,
 +                                        bounce,
 +                                        path_flag,
 +                                        ls)) {
      return false;
    }



More information about the Bf-blender-cvs mailing list