blender/release/scripts/templates_osl/toon_closure.osl
Thomas Dinges 0440d77dbc Cycles / OSL:
* Add a few more OSL templates to the Text Editor, so people can use some of the OSL only shaders and closures.

* Temperature (Kelvin) to RGB converter
* Wavelength to RGB converter
* Ramp closure (Phong and Diffuse)
* Toon closure (Diffuse and Specular)
2013-05-01 13:21:15 +00:00

12 lines
290 B
Plaintext

shader node_toon_bsdf(
color Color = 0.8,
float Size = 0.5,
float Smooth = 0.0,
normal Normal = N,
output closure color Diffuse = 0,
output closure color Specular = 0)
{
Diffuse = Color * diffuse_toon(Normal, Size, Smooth);
Specular = Color * specular_toon(Normal, Size, Smooth);
}