diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-08 18:19:04 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-09 21:58:42 +0300 |
commit | a6968e87f1338081f30725f8f2ca3460e280fea2 (patch) | |
tree | 0fdc61c15c86953fb431894871e7cf0a75dc5031 /intern/cycles/kernel/closure/bssrdf.h | |
parent | 0df9b2c71517a98760a5e577f434d9d86e4e1910 (diff) |
Cycles: add random walk subsurface scattering to Principled BSDF.
Differential Revision: https://developer.blender.org/D3054
Diffstat (limited to 'intern/cycles/kernel/closure/bssrdf.h')
-rw-r--r-- | intern/cycles/kernel/closure/bssrdf.h | 7 |
1 files changed, 5 insertions, 2 deletions
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); } |