0
En revisión

Results of code module don't effect downstream previews.

Peter Todd hace 9 años actualizado hace 9 años 4

I've found that anywhere I have a code node, the results from the output are not influencing the previews of nodes that depend on it.


Currently running v1.24 / Unity 5.2.2f1 Personal. This bug has definitely been there for at least the last few versions of ShaderForge.


Image 482

En revisión

Not just the last few versions - it has been like this since the code node was introduced :)
The reason is that the code node is a bit of an exceptional case, because it's the only node that needs to be compiled separately if it should ever have a preview. That's not to say that it's impossible, but it's harder

OK (although I don't really understand why all previews don't also need to have the appropriate sub-program compiled separately, or how the compilation would involve anything other than concatenating the relevant strings... clearly one of those things that seems simpler from the outside; if you say it's harder I'm sure it is).

"concatenating the relevant strings" is not as easy as it sounds, emphasis on relevant :)

Each node has their own shader at the moment, the code node is the only node where I can't predict what it will do beforehand, so it needs to pre-compile.

Yes... as I say, things always seem simpler from the outside, I do appreciate how it all gets much fiddlier when faced with the reality... :)