diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-10-20 16:18:00 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-10-20 16:18:00 +0400 |
commit | 9a1c1f132de971a840816614a0f4657ef1c12c89 (patch) | |
tree | ba7a0e493733275cb2df1855b69b36452322bf28 /intern/cycles/kernel/osl/background.cpp | |
parent | 3abef3a2e6b77949f2e992baefd660422e3e19fe (diff) |
Cycles OSL: most closure code is now shared between OSL and SVM. Also fix
transmission pass and filter glossy option.
The BSDF closure class is now more similar to the SVM closures, and includes
some flags and labels that are needed to properly categorize the BSDF's for
render passes. Phong closure is gone for the moment, needs to be adapated to
the new structure still.
Diffstat (limited to 'intern/cycles/kernel/osl/background.cpp')
-rw-r--r-- | intern/cycles/kernel/osl/background.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/intern/cycles/kernel/osl/background.cpp b/intern/cycles/kernel/osl/background.cpp index 6290eed0af8..b6e9473b7bf 100644 --- a/intern/cycles/kernel/osl/background.cpp +++ b/intern/cycles/kernel/osl/background.cpp @@ -46,23 +46,16 @@ using namespace OSL; /// to return a color in background shaders. No methods, /// only the weight is taking into account /// -class GenericBackgroundClosure : public BackgroundClosure { +class GenericBackgroundClosure : public OSL::BackgroundClosure { public: GenericBackgroundClosure() {} void setup() {}; - size_t memsize() const { return sizeof(*this); } - const char *name() const { return "background"; } - - void print_on(std::ostream &out) const { - out << name() << " ()"; - } - + void print_on(std::ostream &out) const { out << name() << " ()"; } }; - /// Holdout closure /// /// This will be used by the shader to mark the @@ -75,17 +68,11 @@ public: HoldoutClosure () : ClosurePrimitive(Holdout) {} void setup() {}; - size_t memsize() const { return sizeof(*this); } - const char *name() const { return "holdout"; } - - void print_on(std::ostream &out) const { - out << name() << " ()"; - } + void print_on(std::ostream &out) const { out << name() << " ()"; } }; - ClosureParam *closure_background_params() { static ClosureParam params[] = { |