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
This commit is contained in:
@@ -48,7 +48,6 @@
|
||||
#include "closure/bsdf_diffuse.h"
|
||||
#include "closure/bsdf_microfacet.h"
|
||||
#include "closure/bsdf_oren_nayar.h"
|
||||
#include "closure/bsdf_phong_ramp.h"
|
||||
#include "closure/bsdf_reflection.h"
|
||||
#include "closure/bsdf_refraction.h"
|
||||
#include "closure/bsdf_transparent.h"
|
||||
@@ -194,10 +193,14 @@ void OSLShader::register_closures(OSLShadingSystem *ss_)
|
||||
closure_holdout_params(), closure_holdout_prepare);
|
||||
register_closure(ss, "ambient_occlusion", id++,
|
||||
closure_ambient_occlusion_params(), closure_ambient_occlusion_prepare);
|
||||
register_closure(ss, "phong_ramp", id++,
|
||||
closure_bsdf_phong_ramp_params(), closure_bsdf_phong_ramp_prepare);
|
||||
register_closure(ss, "diffuse_ramp", id++,
|
||||
closure_bsdf_diffuse_ramp_params(), closure_bsdf_diffuse_ramp_prepare);
|
||||
register_closure(ss, "phong_ramp", id++,
|
||||
closure_bsdf_phong_ramp_params(), closure_bsdf_phong_ramp_prepare);
|
||||
register_closure(ss, "diffuse_toon", id++,
|
||||
closure_bsdf_diffuse_toon_params(), closure_bsdf_diffuse_toon_prepare);
|
||||
register_closure(ss, "specular_toon", id++,
|
||||
closure_bsdf_specular_toon_params(), closure_bsdf_specular_toon_prepare);
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
Reference in New Issue
Block a user