diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-20 01:17:16 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-20 01:17:16 +0400 |
commit | 54729df02096da1f3404d4d4891f30752bf90778 (patch) | |
tree | 5fd2ef2365e5e8b1f55b7857dae899f22da5a394 /intern/cycles/kernel/osl/osl_closures.h | |
parent | 8d4c61a2ab386f212bab2865aab76501fe29b48f (diff) |
Cycles OSL: diffuse_toon and specular_toon closures. These are toon shaders with
a size parameter between 0.0 and 1.0 that gives a angle of reflection between
0° and 90°, and a smooth parameter that gives and angle over which a smooth
transition from full to no reflection happens.
These work with global illumination and do importance sampling of the area within
the angle. Note that unlike most other BSDF's these are not energy conserving in
general, in particular if their weight is 1.0 and size > 2/3 (or 60°) they will
add more energy in each bounce.
Diffuse: http://www.pasteall.org/pic/show.php?id=42119
Specular: http://www.pasteall.org/pic/show.php?id=42120
Diffstat (limited to 'intern/cycles/kernel/osl/osl_closures.h')
-rw-r--r-- | intern/cycles/kernel/osl/osl_closures.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/intern/cycles/kernel/osl/osl_closures.h b/intern/cycles/kernel/osl/osl_closures.h index fe37c974e95..daccc03ede2 100644 --- a/intern/cycles/kernel/osl/osl_closures.h +++ b/intern/cycles/kernel/osl/osl_closures.h @@ -47,15 +47,19 @@ OSL::ClosureParam *closure_emission_params(); OSL::ClosureParam *closure_background_params(); OSL::ClosureParam *closure_holdout_params(); OSL::ClosureParam *closure_ambient_occlusion_params(); -OSL::ClosureParam *closure_bsdf_phong_ramp_params(); OSL::ClosureParam *closure_bsdf_diffuse_ramp_params(); +OSL::ClosureParam *closure_bsdf_phong_ramp_params(); +OSL::ClosureParam *closure_bsdf_diffuse_toon_params(); +OSL::ClosureParam *closure_bsdf_specular_toon_params(); void closure_emission_prepare(OSL::RendererServices *, int id, void *data); void closure_background_prepare(OSL::RendererServices *, int id, void *data); void closure_holdout_prepare(OSL::RendererServices *, int id, void *data); void closure_ambient_occlusion_prepare(OSL::RendererServices *, int id, void *data); -void closure_bsdf_phong_ramp_prepare(OSL::RendererServices *, int id, void *data); void closure_bsdf_diffuse_ramp_prepare(OSL::RendererServices *, int id, void *data); +void closure_bsdf_phong_ramp_prepare(OSL::RendererServices *, int id, void *data); +void closure_bsdf_diffuse_toon_prepare(OSL::RendererServices *, int id, void *data); +void closure_bsdf_specular_toon_prepare(OSL::RendererServices *, int id, void *data); enum { AmbientOcclusion = 100 |