Do unused nodes cost performance?

Hi,

  • I have a node group which contains one complex node setup and one simple node setup.

  • The simple setup has an individual output and the complex setup has an individual ouput.

If only the simple output is not connected to the Material Output does it still cost (significant) performance or is it just like deleting the complex node setup completely?

I think material nodes will skip unused outputs. Not sure about compositing nodes, though.

It’s easy to test this, though- Set up a few different materials with different numbers of used/unused nodes and compare render times.

1 Like

During shader compilation cycles will start at the output node and walk the graph back to gather just the nodes it needs, so unconnected parts of the graph cost nothing at render time.

7 Likes

Thank’s a lot guys .:smiley:

Does this happen only on the final render or does it work in the viewport as well?

Viewport as well, it’s just how the shader compilation works