diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-07-12 06:59:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-07-12 06:59:13 +0300 |
commit | 0837d1912649deb4f8fe1bf2bb3adb0c7a89c189 (patch) | |
tree | d9ef3e777a03ddb0633adc2728300d0881886682 /intern | |
parent | ac76a3cabab3995fe2cb35859003735c38a1bf48 (diff) | |
parent | 8603424d0ae46873a04f01288f2adbb14152383e (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/osl/osl_services.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/svm/svm_closure.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/osl/osl_services.cpp b/intern/cycles/kernel/osl/osl_services.cpp index b767c60c617..1535496c73d 100644 --- a/intern/cycles/kernel/osl/osl_services.cpp +++ b/intern/cycles/kernel/osl/osl_services.cpp @@ -824,7 +824,7 @@ bool OSLRenderServices::get_background_attribute(KernelGlobals *kg, ShaderData * bool OSLRenderServices::get_attribute(OSL::ShaderGlobals *sg, bool derivatives, ustring object_name, TypeDesc type, ustring name, void *val) { - if(sg->renderstate == NULL) + if(sg == NULL || sg->renderstate == NULL) return false; ShaderData *sd = (ShaderData *)(sg->renderstate); diff --git a/intern/cycles/kernel/svm/svm_closure.h b/intern/cycles/kernel/svm/svm_closure.h index 9578fcf2687..7704aa545c8 100644 --- a/intern/cycles/kernel/svm/svm_closure.h +++ b/intern/cycles/kernel/svm/svm_closure.h @@ -159,7 +159,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float * /* diffuse */ if(fabsf(average(mixed_ss_base_color)) > CLOSURE_WEIGHT_CUTOFF) { - if(subsurface < CLOSURE_WEIGHT_CUTOFF && diffuse_weight > CLOSURE_WEIGHT_CUTOFF) { + if(subsurface <= CLOSURE_WEIGHT_CUTOFF && diffuse_weight > CLOSURE_WEIGHT_CUTOFF) { float3 diff_weight = weight * base_color * diffuse_weight; PrincipledDiffuseBsdf *bsdf = (PrincipledDiffuseBsdf*)bsdf_alloc(sd, sizeof(PrincipledDiffuseBsdf), diff_weight); |