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_diffuse_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_diffuse_ramp.cpp')
-rw-r--r-- | intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp b/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp index a320bea118a..0e8193aa68c 100644 --- a/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp +++ b/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp @@ -46,14 +46,10 @@ using namespace OSL; class DiffuseRampClosure : public CBSDFClosure { public: - DiffuseRampClosure() : CBSDFClosure(LABEL_DIFFUSE) {} Color3 colors[8]; float3 fcolors[8]; - size_t memsize() const { return sizeof(*this); } - const char *name() const { return "diffuse_ramp"; } - - void setup() + DiffuseRampClosure() : CBSDFClosure(LABEL_DIFFUSE) { sc.prim = this; m_shaderdata_flag = bsdf_diffuse_ramp_setup(&sc); @@ -62,21 +58,11 @@ public: fcolors[i] = TO_FLOAT3(colors[i]); } - bool mergeable(const ClosurePrimitive *other) const - { - return false; - } - void blur(float roughness) { bsdf_diffuse_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_diffuse_ramp_eval_reflect(&sc, fcolors, omega_out, omega_in, &pdf); @@ -109,7 +95,7 @@ ClosureParam *closure_bsdf_diffuse_ramp_params() return params; } -CLOSURE_PREPARE(closure_bsdf_diffuse_ramp_prepare, DiffuseRampClosure) +CCLOSURE_PREPARE(closure_bsdf_diffuse_ramp_prepare, DiffuseRampClosure) CCL_NAMESPACE_END |