Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-09-01 18:10:40 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-09-01 18:10:40 +0400
commitf3252c261dc21ffaceab2e1b377c824d70ee9436 (patch)
treea96becd955cb1c0671c1a3e27e015a4caef53eef /intern/cycles
parent902e1d0b53f41ddfb2a0320bdc0cf72b28e1c18d (diff)
Fix #36620: sss + indirect light rendering artifacts, due to wrong correlation in
the random numbers.
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/kernel/kernel_path.h6
-rw-r--r--intern/cycles/render/integrator.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index 8cb83e0797e..36aaba2aac5 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -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);
}
}
diff --git a/intern/cycles/render/integrator.cpp b/intern/cycles/render/integrator.cpp
index 47b1930e27c..88466f24ec5 100644
--- a/intern/cycles/render/integrator.cpp
+++ b/intern/cycles/render/integrator.cpp
@@ -126,7 +126,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
max_samples = max(max_samples, max(ao_samples, max(mesh_light_samples, subsurface_samples)));
}
- max_samples *= (max_bounce + transparent_max_bounce + 2);
+ max_samples *= (max_bounce + transparent_max_bounce + 3);
int dimensions = PRNG_BASE_NUM + max_samples*PRNG_BOUNCE_NUM;
dimensions = min(dimensions, SOBOL_MAX_DIMENSIONS);