diff options
author | Thomas Dinges <blender@dingto.org> | 2015-11-18 19:20:39 +0300 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2015-11-18 19:20:39 +0300 |
commit | 836c69c92fb5992eb83c4311a98f5ffad4a172f5 (patch) | |
tree | e2909493c56a4159646e6ac61805b1b760983cea /intern | |
parent | 38bbc920a60c39e18f866175563a63e834a10f5e (diff) |
Cleanup: Add some notes in code for upcoming graph simplification process.
Diffstat (limited to 'intern')
-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 */ |