[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59705] trunk/blender/intern/cycles: Fix #36620: sss + indirect light rendering artifacts, due to wrong correlation in

Brecht Van Lommel brechtvanlommel at pandora.be
Sun Sep 1 16:10:40 CEST 2013


Revision: 59705
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59705
Author:   blendix
Date:     2013-09-01 14:10:40 +0000 (Sun, 01 Sep 2013)
Log Message:
-----------
Fix #36620: sss + indirect light rendering artifacts, due to wrong correlation in
the random numbers.

Modified Paths:
--------------
    trunk/blender/intern/cycles/kernel/kernel_path.h
    trunk/blender/intern/cycles/render/integrator.cpp

Modified: trunk/blender/intern/cycles/kernel/kernel_path.h
===================================================================
--- trunk/blender/intern/cycles/kernel/kernel_path.h	2013-09-01 13:19:06 UTC (rev 59704)
+++ trunk/blender/intern/cycles/kernel/kernel_path.h	2013-09-01 14:10:40 UTC (rev 59705)
@@ -791,10 +791,10 @@
 						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 @@
 							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);
 					}
 				}
 

Modified: trunk/blender/intern/cycles/render/integrator.cpp
===================================================================
--- trunk/blender/intern/cycles/render/integrator.cpp	2013-09-01 13:19:06 UTC (rev 59704)
+++ trunk/blender/intern/cycles/render/integrator.cpp	2013-09-01 14:10:40 UTC (rev 59705)
@@ -126,7 +126,7 @@
 		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);




More information about the Bf-blender-cvs mailing list