Fix #36620: sss + indirect light rendering artifacts, due to wrong correlation in
the random numbers.
This commit is contained in:
@@ -791,10 +791,10 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
|
||||
hit_state.flag |= PATH_RAY_BSSRDF_ANCESTOR;
|
||||
|
||||
if(kernel_path_integrate_lighting(kg, rng, sample, num_samples, &bssrdf_sd[hit],
|
||||
&tp, &hit_min_ray_pdf, &hit_ray_pdf, &hit_state, rng_offset, &L, &hit_ray, &hit_ray_t)) {
|
||||
&tp, &hit_min_ray_pdf, &hit_ray_pdf, &hit_state, rng_offset+PRNG_BOUNCE_NUM, &L, &hit_ray, &hit_ray_t)) {
|
||||
kernel_path_indirect(kg, rng, sample, hit_ray, buffer,
|
||||
tp, num_samples, num_samples,
|
||||
hit_min_ray_pdf, hit_ray_pdf, hit_state, rng_offset+PRNG_BOUNCE_NUM, &L);
|
||||
hit_min_ray_pdf, hit_ray_pdf, hit_state, rng_offset+PRNG_BOUNCE_NUM*2, &L);
|
||||
|
||||
/* for render passes, sum and reset indirect light pass variables
|
||||
* for the next samples */
|
||||
@@ -1265,7 +1265,7 @@ __device float4 kernel_branched_path_integrate(KernelGlobals *kg, RNG *rng, int
|
||||
kernel_branched_path_integrate_lighting(kg, rng, sample*num_samples + j,
|
||||
aa_samples*num_samples,
|
||||
&bssrdf_sd[hit], throughput, num_samples_inv,
|
||||
ray_pdf, ray_pdf, state, rng_offset, &L, buffer);
|
||||
ray_pdf, ray_pdf, state, rng_offset+PRNG_BOUNCE_NUM, &L, buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user