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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-11-20 16:18:27 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-11-20 16:18:27 +0300
commit7e71be261bb88d0a7c1dcef7b19995317fdb51ef (patch)
tree9939d3285bea1aa9eb2e328c931162ce5adbd09f /intern/cycles/render/graph.h
parentc4188c2bbabd87e12c7827fb30d42d2a9f61df8e (diff)
Cycles: Fix filter glossy being broken after recent changes
Basically we can not use sharp closure as a substitude when filter glossy is used. This is because we can not blur sharp reflection/refraction. This is quite quick and not really clean implementation. Not really happy with manual handling of original settings, but this is as good as we can do in the quick patch. It's a good acknowledgment and we now can re-consider some aspects of graph simplification to make such cases more natively supported. P.S. This failure would have been shown by our regression tests, so please, bother a bit to run Cycles's test sweep before doing such optimizations.
Diffstat (limited to 'intern/cycles/render/graph.h')
-rw-r--r--intern/cycles/render/graph.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/intern/cycles/render/graph.h b/intern/cycles/render/graph.h
index fa2de3703c0..a2c210f4f60 100644
--- a/intern/cycles/render/graph.h
+++ b/intern/cycles/render/graph.h
@@ -29,6 +29,7 @@
CCL_NAMESPACE_BEGIN
class AttributeRequestSet;
+class Scene;
class Shader;
class ShaderInput;
class ShaderOutput;
@@ -196,7 +197,7 @@ public:
virtual void attributes(Shader *shader, AttributeRequestSet *attributes);
virtual void compile(SVMCompiler& compiler) = 0;
virtual void compile(OSLCompiler& compiler) = 0;
- virtual void optimize() {};
+ virtual void optimize(Scene * /*scene*/) {};
virtual bool has_surface_emission() { return false; }
virtual bool has_surface_transparent() { return false; }
@@ -204,6 +205,7 @@ public:
virtual bool has_bssrdf_bump() { return false; }
virtual bool has_spatial_varying() { return false; }
virtual bool has_object_dependency() { return false; }
+ virtual bool has_integrator_dependency() { return false; }
vector<ShaderInput*> inputs;
vector<ShaderOutput*> outputs;
@@ -276,8 +278,10 @@ public:
void relink(vector<ShaderInput*> inputs, vector<ShaderInput*> outputs, ShaderOutput *output);
void remove_unneeded_nodes();
- void simplify_nodes();
- void finalize(bool do_bump = false, bool do_osl = false);
+ void finalize(Scene *scene,
+ bool do_bump = false,
+ bool do_osl = false,
+ bool do_simplify = false);
int get_num_closures();
@@ -290,7 +294,8 @@ protected:
void copy_nodes(set<ShaderNode*>& nodes, map<ShaderNode*, ShaderNode*>& nnodemap);
void break_cycles(ShaderNode *node, vector<bool>& visited, vector<bool>& on_stack);
- void clean();
+ void clean(Scene *scene);
+ void simplify_nodes(Scene *scene);
void bump_from_displacement();
void refine_bump_nodes();
void default_inputs(bool do_osl);