diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2016-12-15 01:47:39 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2017-03-27 06:36:49 +0300 |
commit | 5aaa643947929cf807c349b2b5fe33d4dc669c3d (patch) | |
tree | 091bf2c52f7a935525004bab2ceabeba989fafe6 /intern/cycles/render/graph.h | |
parent | 086320a62e108b6e640f2b2453b8f1f0a946e57b (diff) |
Cycles: Optimize shaders earlier to skip unneccessary attributes for noninteractive rendering
Before, Cycles would first sync the shader exactly as shown in the UI, then determine and sync the used attributes and later optimize the shader.
Therefore, even completely unconnected nodes would cause unneccessary attributes to be synced.
The reason for this is to avoid frequent resyncs when editing shaders interactively, but it can still be avoided for noninteractive renders - which is what this commit does.
Reviewed by: sergey
Differential Revision: https://developer.blender.org/D2285
Diffstat (limited to 'intern/cycles/render/graph.h')
-rw-r--r-- | intern/cycles/render/graph.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/cycles/render/graph.h b/intern/cycles/render/graph.h index 06524d3fa13..d22193d4e51 100644 --- a/intern/cycles/render/graph.h +++ b/intern/cycles/render/graph.h @@ -240,6 +240,7 @@ public: list<ShaderNode*> nodes; size_t num_node_ids; bool finalized; + bool simplified; ShaderGraph(); ~ShaderGraph(); @@ -255,9 +256,9 @@ public: void relink(ShaderNode *node, ShaderOutput *from, ShaderOutput *to); void remove_proxy_nodes(); + void simplify(Scene *scene); void finalize(Scene *scene, bool do_bump = false, - bool do_osl = false, bool do_simplify = false, bool bump_in_object_space = false); |