Is there a way to run data through a shader node to compute what that node would do to it? I’ve been implementing every shader node manually, and it sortof works, but it’s tedious and inefficient. The goal is to bake vertex channels or uvs channels with arbitrary data derived from other channels/nodes.
As you can see, my computed results are pretty close to the results of the graph. I can just go paint the masks and change the RGB nodes, edit the graph, etc. and just run the script again. Just wish I could query a node with some input data (float, color or vector) and got the transformed data in return.
Because right now, for each shaderNode type, I have to implement it myself (convert types if needed, usually add or remove gamma(2.2) from color, etc.)
Ideally the ShaderNode class would have a function that would take inputs and parameters as arguments, and return the outputs.
Is there currently some way of getting this kind of behaviour?
Is there a better strategy for getting full support of every shader node, than to manually reimplement them all? (I’m just implementing them as I need them right now)