From a6968e87f1338081f30725f8f2ca3460e280fea2 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 8 Feb 2018 16:19:04 +0100 Subject: Cycles: add random walk subsurface scattering to Principled BSDF. Differential Revision: https://developer.blender.org/D3054 --- intern/cycles/kernel/closure/bssrdf.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'intern/cycles/kernel/closure') diff --git a/intern/cycles/kernel/closure/bssrdf.h b/intern/cycles/kernel/closure/bssrdf.h index 790368ee888..8578767b07e 100644 --- a/intern/cycles/kernel/closure/bssrdf.h +++ b/intern/cycles/kernel/closure/bssrdf.h @@ -373,7 +373,9 @@ ccl_device int bssrdf_setup(ShaderData *sd, Bssrdf *bssrdf, ClosureType type) if(bssrdf_channels < 3) { /* Add diffuse BSDF if any radius too small. */ #ifdef __PRINCIPLED__ - if(type == CLOSURE_BSSRDF_PRINCIPLED_ID) { + if(type == CLOSURE_BSSRDF_PRINCIPLED_ID || + type == CLOSURE_BSSRDF_PRINCIPLED_RANDOM_WALK_ID) + { float roughness = bssrdf->roughness; float3 N = bssrdf->N; @@ -409,7 +411,8 @@ ccl_device int bssrdf_setup(ShaderData *sd, Bssrdf *bssrdf, ClosureType type) if(type == CLOSURE_BSSRDF_BURLEY_ID || type == CLOSURE_BSSRDF_PRINCIPLED_ID || - type == CLOSURE_BSSRDF_RANDOM_WALK_ID) + type == CLOSURE_BSSRDF_RANDOM_WALK_ID || + type == CLOSURE_BSSRDF_PRINCIPLED_RANDOM_WALK_ID) { bssrdf_burley_setup(bssrdf); } -- cgit v1.2.3