diff options
Diffstat (limited to 'intern/cycles/kernel/svm/svm_closure.h')
-rw-r--r-- | intern/cycles/kernel/svm/svm_closure.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/intern/cycles/kernel/svm/svm_closure.h b/intern/cycles/kernel/svm/svm_closure.h index d97e165c66d..0621133a316 100644 --- a/intern/cycles/kernel/svm/svm_closure.h +++ b/intern/cycles/kernel/svm/svm_closure.h @@ -322,6 +322,23 @@ __device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *st } break; } + case CLOSURE_BSDF_DIFFUSE_TOON_ID: + case CLOSURE_BSDF_GLOSSY_TOON_ID: { + ShaderClosure *sc = svm_node_closure_get_bsdf(sd, mix_weight); + + if(sc) { + /* Normal, Size and Smooth */ + sc->N = N; + sc->data0 = param1; + sc->data1 = param2; + + if (type == CLOSURE_BSDF_DIFFUSE_TOON_ID) + sd->flag |= bsdf_diffuse_toon_setup(sc); + else + sd->flag |= bsdf_glossy_toon_setup(sc); + } + break; + } #ifdef __SUBSURFACE__ case CLOSURE_BSSRDF_ID: { ShaderClosure *sc = &sd->closure[sd->num_closure]; |