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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-11-22 14:08:03 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-11-25 11:01:22 +0300
commit26f1c51ca6fb1cc8d0b9b39781ed50d074e8c84f (patch)
treea1791cfec6b883a9d92397f3dbbe651dec7bec99 /intern/cycles/kernel/kernel_bake.h
parent2a5c1fc9ccbabfaef4eeaf90093dfb2ac0acfc90 (diff)
Cycles: Trace indirect subsurface rays by restarting the integrator loop
This gives much lower stack usage on GPU and reduces kernel memory size to around 448MB on GTX560Ti (comparing to 652MB with previous commit and 946MB with official release). There's also a barely measurable speedup of around 5%, but this is to be confirmed still. At this stage we're using only ~3% for the experimental kernel and SSS rendering seems to be faster by 40% and after some further testing we might consider making SSS and CMJ official features and remove experimental precompiled kernels.
Diffstat (limited to 'intern/cycles/kernel/kernel_bake.h')
-rw-r--r--intern/cycles/kernel/kernel_bake.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_bake.h b/intern/cycles/kernel/kernel_bake.h
index 0f572b34ae0..3efd7ecca5f 100644
--- a/intern/cycles/kernel/kernel_bake.h
+++ b/intern/cycles/kernel/kernel_bake.h
@@ -74,7 +74,22 @@ ccl_device void compute_light_pass(KernelGlobals *kg, ShaderData *sd, PathRadian
&throughput,
&ss_indirect))
{
- kernel_path_subsurface_scatter_indirect(kg, &L_sample, &state, &rng, &ray, &ss_indirect);
+ while(ss_indirect.num_rays) {
+ kernel_path_subsurface_setup_indirect(kg,
+ &ss_indirect,
+ &L_sample,
+ &state,
+ &ray,
+ &ray,
+ &throughput);
+ kernel_path_indirect(kg,
+ &rng,
+ &ray,
+ throughput,
+ state.num_samples,
+ &state,
+ &L_sample);
+ }
is_sss_sample = true;
}
}