Cycles: Fix regression in SSS rendering after principled commit
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 21 Apr 2017 09:50:35 +0000 (11:50 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 21 Apr 2017 10:01:27 +0000 (12:01 +0200)
intern/cycles/kernel/kernel_subsurface.h

index 17b3cf033a1cd7f64580ba862d374f7d86373876..fb4a054dcd0188ea961ec796d389360f9ac8adb8 100644 (file)
@@ -162,7 +162,9 @@ ccl_device void subsurface_scatter_setup_diffuse_bsdf(ShaderData *sd, ShaderClos
                                bsdf->type = CLOSURE_BSDF_BSSRDF_PRINCIPLED_ID;
                        }
                }
-               else if(CLOSURE_IS_BSSRDF(bssrdf->type)) {
+               else if(CLOSURE_IS_BSDF_BSSRDF(bssrdf->type) ||
+                       CLOSURE_IS_BSSRDF(bssrdf->type))
+               {
                        DiffuseBsdf *bsdf = (DiffuseBsdf*)bsdf_alloc(sd, sizeof(DiffuseBsdf), weight);
 
                        if(bsdf) {