diff options
author | Karsten Schwenk <macnihilist@gmx.net> | 2014-06-08 14:16:28 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-06-14 15:49:57 +0400 |
commit | 8ce1090d4e8160165281be4b0827dbc1ba28dc8a (patch) | |
tree | e65ed8a8bcebab84c50da6a286fa845c6a8ae92e /intern/cycles/kernel/osl/osl_closures.cpp | |
parent | f5cb0cf1a50350e32b6fec5056f23a20606c7ea0 (diff) |
Cycles: Ashikhmin-Shirley anisotropic BSDF
* Ashikhmin-Shirley anisotropic BSDF was added as closure
* Anisotropic BSDF node now has two distributions
Reviewers: brecht, dingto
Differential Revision: https://developer.blender.org/D549
Diffstat (limited to 'intern/cycles/kernel/osl/osl_closures.cpp')
-rw-r--r-- | intern/cycles/kernel/osl/osl_closures.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/kernel/osl/osl_closures.cpp b/intern/cycles/kernel/osl/osl_closures.cpp index a96c0e2b1fb..9a1819ca116 100644 --- a/intern/cycles/kernel/osl/osl_closures.cpp +++ b/intern/cycles/kernel/osl/osl_closures.cpp @@ -52,6 +52,7 @@ #include "closure/bsdf_refraction.h" #include "closure/bsdf_transparent.h" #include "closure/bsdf_ward.h" +#include "closure/bsdf_ashikhmin_shirley.h" #include "closure/bsdf_westin.h" #include "closure/bsdf_toon.h" #include "closure/bsdf_hair.h" @@ -110,6 +111,13 @@ BSDF_CLOSURE_CLASS_BEGIN(Ward, ward, ward, LABEL_GLOSSY) CLOSURE_FLOAT_PARAM(WardClosure, sc.data1), BSDF_CLOSURE_CLASS_END(Ward, ward) +BSDF_CLOSURE_CLASS_BEGIN(AshikhminShirley, ashikhmin_shirley, ashikhmin_shirley, LABEL_GLOSSY) + CLOSURE_FLOAT3_PARAM(AshikhminShirleyClosure, sc.N), + CLOSURE_FLOAT3_PARAM(AshikhminShirleyClosure, sc.T), + CLOSURE_FLOAT_PARAM(AshikhminShirleyClosure, sc.data0), + CLOSURE_FLOAT_PARAM(AshikhminShirleyClosure, sc.data1), +BSDF_CLOSURE_CLASS_END(AshikhminShirley, ashikhmin_shirley) + BSDF_CLOSURE_CLASS_BEGIN(DiffuseToon, diffuse_toon, diffuse_toon, LABEL_DIFFUSE) CLOSURE_FLOAT3_PARAM(DiffuseToonClosure, sc.N), CLOSURE_FLOAT_PARAM(DiffuseToonClosure, sc.data0), @@ -218,6 +226,8 @@ void OSLShader::register_closures(OSLShadingSystem *ss_) bsdf_microfacet_beckmann_refraction_params(), bsdf_microfacet_beckmann_refraction_prepare); register_closure(ss, "ward", id++, bsdf_ward_params(), bsdf_ward_prepare); + register_closure(ss, "ashikhmin_shirley", id++, + bsdf_ashikhmin_shirley_params(), bsdf_ashikhmin_shirley_prepare); register_closure(ss, "ashikhmin_velvet", id++, bsdf_ashikhmin_velvet_params(), bsdf_ashikhmin_velvet_prepare); register_closure(ss, "diffuse_toon", id++, |