diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-11-29 05:09:24 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-11-29 07:01:07 +0400 |
commit | 746628e0d021fa616c69e9ff0ef9ad71cba23694 (patch) | |
tree | 4ca4b0e2d1aae189bc06df1a0b652ec5280a37aa /intern/cycles/kernel/osl/bsdf_phong_ramp.cpp | |
parent | aa3933b411fc61d673facc6ea6f8cce6d86a3c6c (diff) |
Cycles OSL: refactoring to remove all dependencies on builtin OSL closures.
These were removed in new OSL versions. We only used these as base classes,
not using them at all simplifies the code a bit.
Diffstat (limited to 'intern/cycles/kernel/osl/bsdf_phong_ramp.cpp')
-rw-r--r-- | intern/cycles/kernel/osl/bsdf_phong_ramp.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/intern/cycles/kernel/osl/bsdf_phong_ramp.cpp b/intern/cycles/kernel/osl/bsdf_phong_ramp.cpp index ef656ee7d5f..3c95bfc119e 100644 --- a/intern/cycles/kernel/osl/bsdf_phong_ramp.cpp +++ b/intern/cycles/kernel/osl/bsdf_phong_ramp.cpp @@ -45,14 +45,10 @@ using namespace OSL; class PhongRampClosure : public CBSDFClosure { public: - PhongRampClosure() : CBSDFClosure(LABEL_GLOSSY) {} Color3 colors[8]; float3 fcolors[8]; - size_t memsize() const { return sizeof(*this); } - const char *name() const { return "phong_ramp"; } - - void setup() + PhongRampClosure() : CBSDFClosure(LABEL_GLOSSY) { sc.prim = this; m_shaderdata_flag = bsdf_phong_ramp_setup(&sc); @@ -61,21 +57,11 @@ public: fcolors[i] = TO_FLOAT3(colors[i]); } - bool mergeable(const ClosurePrimitive *other) const - { - return false; - } - void blur(float roughness) { bsdf_phong_ramp_blur(&sc, roughness); } - void print_on(std::ostream &out) const - { - out << name() << " ((" << sc.N[0] << ", " << sc.N[1] << ", " << sc.N[2] << "))"; - } - float3 eval_reflect(const float3 &omega_out, const float3 &omega_in, float& pdf) const { return bsdf_phong_ramp_eval_reflect(&sc, fcolors, omega_out, omega_in, &pdf); @@ -109,7 +95,7 @@ ClosureParam *closure_bsdf_phong_ramp_params() return params; } -CLOSURE_PREPARE(closure_bsdf_phong_ramp_prepare, PhongRampClosure) +CCLOSURE_PREPARE(closure_bsdf_phong_ramp_prepare, PhongRampClosure) CCL_NAMESPACE_END |