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
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-11-27 14:41:05 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-11-27 15:15:02 +0300
commit175f00c89a88056b5307ec385968333c9327b63f (patch)
tree034235a89ed6c0bfae4787a840fc8a39b485079a /intern
parenta28e014313fbf4bc20af45fd8d45531f1eac2fbf (diff)
Revert "Cycles: Fix wrong SSS with regular path tracing and clamping enabled"
This wasn't really a complete fix and only worked if there was a single scatter event recorded only. Proper fix requires some more thoughts to make it correct without memory use increase. This reverts commit bf9e88bfbebaf5c6228363560970fa526e779c8b.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_bake.h7
-rw-r--r--intern/cycles/kernel/kernel_path.h18
2 files changed, 10 insertions, 15 deletions
diff --git a/intern/cycles/kernel/kernel_bake.h b/intern/cycles/kernel/kernel_bake.h
index 192cba609b9..3efd7ecca5f 100644
--- a/intern/cycles/kernel/kernel_bake.h
+++ b/intern/cycles/kernel/kernel_bake.h
@@ -77,6 +77,7 @@ ccl_device void compute_light_pass(KernelGlobals *kg, ShaderData *sd, PathRadian
while(ss_indirect.num_rays) {
kernel_path_subsurface_setup_indirect(kg,
&ss_indirect,
+ &L_sample,
&state,
&ray,
&ray,
@@ -88,12 +89,6 @@ ccl_device void compute_light_pass(KernelGlobals *kg, ShaderData *sd, PathRadian
state.num_samples,
&state,
&L_sample);
-
- /* For render passes, sum and reset indirect light pass variables
- * for the next samples.
- */
- path_radiance_sum_indirect(&L_sample);
- path_radiance_reset_indirect(&L_sample);
}
is_sss_sample = true;
}
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index b3622283c2a..885782f1a67 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -519,6 +519,7 @@ ccl_device bool kernel_path_subsurface_scatter(
ccl_device void kernel_path_subsurface_setup_indirect(
KernelGlobals *kg,
SubsurfaceIndirectRays *ss_indirect,
+ PathRadiance *L,
PathState *state,
Ray *orig_ray,
Ray *ray,
@@ -547,6 +548,12 @@ ccl_device void kernel_path_subsurface_setup_indirect(
#endif
*ray = *indirect_ray;
+
+ /* For render passes, sum and reset indirect light pass variables
+ * for the next samples.
+ */
+ path_radiance_sum_indirect(L);
+ path_radiance_reset_indirect(L);
}
#endif
@@ -577,7 +584,7 @@ ccl_device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample,
*/
Ray ss_orig_ray;
- for(int ss_indirect_iter = 0; ; ss_indirect_iter++) {
+ for(;;) {
#endif
/* path iteration */
@@ -841,20 +848,13 @@ ccl_device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample,
}
#ifdef __SUBSURFACE__
- if(ss_indirect_iter != 0) {
- /* For render passes, sum and reset indirect light pass variables
- * for the next samples.
- */
- path_radiance_sum_indirect(&L);
- path_radiance_reset_indirect(&L);
- }
-
/* Trace indirect subsurface rays by restarting the loop. this uses less
* stack memory than invoking kernel_path_indirect.
*/
if(ss_indirect.num_rays) {
kernel_path_subsurface_setup_indirect(kg,
&ss_indirect,
+ &L,
&state,
&ss_orig_ray,
&ray,