Code cleanup: refactor BSSRDF closure sampling, for next commit.

This commit is contained in:
Brecht Van Lommel
2017-09-15 01:55:44 +02:00
parent d029399e6b
commit b3afc8917c
6 changed files with 125 additions and 150 deletions

View File

@@ -32,11 +32,7 @@ bool kernel_path_subsurface_scatter(
ccl_addr_space float3 *throughput,
ccl_addr_space SubsurfaceIndirectRays *ss_indirect)
{
float bssrdf_probability;
ShaderClosure *sc = subsurface_scatter_pick_closure(kg, sd, &bssrdf_probability);
/* modify throughput for picking bssrdf or bsdf */
*throughput *= bssrdf_probability;
const ShaderClosure *sc = shader_bssrdf_pick(sd, throughput);
/* do bssrdf scatter step if we picked a bssrdf closure */
if(sc) {