diff options
-rw-r--r-- | intern/cycles/render/graph.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp index 16e1ef7a493..a342eaed373 100644 --- a/intern/cycles/render/graph.cpp +++ b/intern/cycles/render/graph.cpp @@ -576,9 +576,25 @@ void ShaderGraph::break_cycles(ShaderNode *node, vector<bool>& visited, vector<b void ShaderGraph::clean() { - /* remove proxy and unnecessary nodes */ + /* Graph simplification: + * 1: Remove unnecesarry nodes + * 2: Constant folding + * 3: Simplification + * 4: De-duplication + */ + + /* 1: Remove proxy and unnecessary nodes. */ remove_unneeded_nodes(); + /* 2: Constant folding. */ + /* TODO(dingto): Implement */ + + /* 3: Simplification. */ + /* TODO(dingto): Implement */ + + /* 4: De-duplication. */ + /* TODO(dingto): Implement */ + /* we do two things here: find cycles and break them, and remove unused * nodes that don't feed into the output. how cycles are broken is * undefined, they are invalid input, the important thing is to not crash */ |