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.
This commit is contained in:
Sergey Sharybin
2015-11-22 16:08:03 +05:00
parent 2a5c1fc9cc
commit 26f1c51ca6
2 changed files with 71 additions and 42 deletions

View File

@@ -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;
}
}