Instead of generating a dependency sorted node list whenever
evaluating texture or EEVEE/viewport shader nodes, use the
existing sorted array from the topology cache. This is more
efficient because the algorithm isn't quadratic, and the result
is cached. It's also the second-to-last place to use
node.runtime->level, which can be removed soon.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
Comment Actions
diff --git a/source/blender/nodes/shader/node_shader_tree.cc b/source/blender/nodes/shader/node_shader_tree.cc index 0c0bb1c4316..09a1125d7b5 100644 --- a/source/blender/nodes/shader/node_shader_tree.cc +++ b/source/blender/nodes/shader/node_shader_tree.cc @@ -889,6 +889,7 @@ static void ntree_shader_weight_tree_invert(bNodeTree *ntree, bNode *output_node case SH_NODE_VOLUME_PRINCIPLED: case SH_NODE_VOLUME_SCATTER: fromsock = ntree_shader_node_find_input(fromnode, "Weight"); + fromsock->flag &= ~SOCK_UNAVAIL; if (fromsock->link) { ntree_weight_tree_merge_weight(ntree, fromnode, fromsock, &tonode, &tosock); }
Should also add a comment that the socket is made available so that links to it are available as well and are not ignored in other places.