Cycles / Toon BSDF:

* Added a toon bsdf node to Cycles. This was already available as OSL only closure, but is now available inside the SVM backed as well, for CPU and GPU rendering. 
* There are 2 variations available, diffuse and glossy toon, selectable via a menu inside the node. 

Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Toon

Example render & blend file:
http://www.pasteall.org/pic/show.php?id=51970
http://www.pasteall.org/blend/21579
This commit is contained in:
Thomas Dinges
2013-05-23 17:45:20 +00:00
parent 3b0cc9cfd7
commit 99b325cebf
26 changed files with 268 additions and 209 deletions

View File

@@ -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];