Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-29 05:09:24 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-29 07:01:07 +0400
commit746628e0d021fa616c69e9ff0ef9ad71cba23694 (patch)
tree4ca4b0e2d1aae189bc06df1a0b652ec5280a37aa /intern/cycles/kernel/osl/osl_bssrdf.cpp
parentaa3933b411fc61d673facc6ea6f8cce6d86a3c6c (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/osl_bssrdf.cpp')
-rw-r--r--intern/cycles/kernel/osl/osl_bssrdf.cpp34
1 files changed, 4 insertions, 30 deletions
diff --git a/intern/cycles/kernel/osl/osl_bssrdf.cpp b/intern/cycles/kernel/osl/osl_bssrdf.cpp
index 975967c0bbb..887015c886e 100644
--- a/intern/cycles/kernel/osl/osl_bssrdf.cpp
+++ b/intern/cycles/kernel/osl/osl_bssrdf.cpp
@@ -51,24 +51,11 @@ using namespace OSL;
class CubicBSSRDFClosure : public CBSSRDFClosure {
public:
- size_t memsize() const { return sizeof(*this); }
- const char *name() const { return "bssrdf_cubic"; }
-
- void setup()
+ CubicBSSRDFClosure()
{
sc.type = CLOSURE_BSSRDF_CUBIC_ID;
sc.data0 = fabsf(average(radius));
}
-
- bool mergeable(const ClosurePrimitive *other) const
- {
- return false;
- }
-
- void print_on(std::ostream &out) const
- {
- out << name() << " ((" << sc.N[0] << ", " << sc.N[1] << ", " << sc.N[2] << "))";
- }
};
ClosureParam *closure_bssrdf_cubic_params()
@@ -96,30 +83,17 @@ ClosureParam *closure_bssrdf_cubic_extended_params()
return params;
}
-CLOSURE_PREPARE(closure_bssrdf_cubic_prepare, CubicBSSRDFClosure)
+CCLOSURE_PREPARE(closure_bssrdf_cubic_prepare, CubicBSSRDFClosure)
/* Gaussian */
class GaussianBSSRDFClosure : public CBSSRDFClosure {
public:
- size_t memsize() const { return sizeof(*this); }
- const char *name() const { return "bssrdf_gaussian"; }
-
- void setup()
+ GaussianBSSRDFClosure()
{
sc.type = CLOSURE_BSSRDF_GAUSSIAN_ID;
sc.data0 = fabsf(average(radius));
}
-
- bool mergeable(const ClosurePrimitive *other) const
- {
- return false;
- }
-
- void print_on(std::ostream &out) const
- {
- out << name() << " ((" << sc.N[0] << ", " << sc.N[1] << ", " << sc.N[2] << "))";
- }
};
ClosureParam *closure_bssrdf_gaussian_params()
@@ -146,7 +120,7 @@ ClosureParam *closure_bssrdf_gaussian_extended_params()
return params;
}
-CLOSURE_PREPARE(closure_bssrdf_gaussian_prepare, GaussianBSSRDFClosure)
+CCLOSURE_PREPARE(closure_bssrdf_gaussian_prepare, GaussianBSSRDFClosure)
CCL_NAMESPACE_END