Node Precomputation

Do Cycles nodes support previews and precomputation?

If not are there plans or suggestions to implement this?

Cycles does not support node previews in the node editor, if that’s what you’re asking.

Not sure what you mean “precomputation” though.

When the render is started is the node calculated for every sample or is there a function to compute some data at the start of the render. E.g. is the colorramp sampled once or multiple times?

It depends. If we can detect that it has a constant value we sample the node once, if it’s potentially different for every pixel we need to sample it for every pixel.

If it’s a constant value where in the cycles code should this go?

here is the one for the ramp, but it’s done on a node by node basis.

Thanks I’ll take a look at how it’s done.