From fffdedbcc13aa68ddb0c5f4ffd725e3ba0ea4a36 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 3 Jan 2019 17:08:46 +0100 Subject: Fix T54962: Cycles crash using subsurface scattering texture blur. --- intern/cycles/kernel/kernel_path_branched.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'intern/cycles/kernel/kernel_path_branched.h') diff --git a/intern/cycles/kernel/kernel_path_branched.h b/intern/cycles/kernel/kernel_path_branched.h index 80fcf5b0565..21da4d9308b 100644 --- a/intern/cycles/kernel/kernel_path_branched.h +++ b/intern/cycles/kernel/kernel_path_branched.h @@ -368,12 +368,16 @@ ccl_device void kernel_branched_path_subsurface_scatter(KernelGlobals *kg, /* compute lighting with the BSDF closure */ for(int hit = 0; hit < num_hits; hit++) { ShaderData bssrdf_sd = *sd; + Bssrdf *bssrdf = (Bssrdf *)sc; + ClosureType bssrdf_type = sc->type; + float bssrdf_roughness = bssrdf->roughness; subsurface_scatter_multi_setup(kg, &ss_isect, hit, &bssrdf_sd, &hit_state, - sc); + bssrdf_type, + bssrdf_roughness); #ifdef __VOLUME__ if(need_update_volume_stack) { -- cgit v1.2.3