ShadowPass Node
This is EZ, I think :)
1) It's a node. Nothing scary, just a node.
2) It ONLY can send its output directly into an input into the Main Node. Nowhere else.
3) It receives exactly TWO inputs of the same type. Nothing scary there either.
4) The first input will be called "MAIN PASS". How cool is that?
5) The second input will be called "SHADOW PASS". -- I'm running out of lame comments.
6) All the logic requires to compute the "MAIN PASS" input will be put into... the main pass.
7) All the logic required to compute the "SHADOW PASS" input will be put into the shadow pass.
So, for example, assuming this node is connected to the alpha clip input of the Main Node... then the main pass will do:
float MAIN_PASS = blah * blah * blah; //<-- all the logic of the first input.
clip(MAIN_PASS);
And the shadow pass would have something like...
float SHADOW_PASS = bleh * bleh * bleh; //<-- all the logic of the second input.
clip(SHADOW_PASS);
So assuming someone, like me, wants to dither the alpha clip of the main pass but not do the same on the shadow pass.. this node would like to say hello. :)
The only slightly complex thing would be if the user has any GET/SET nodes in their tree. And say, they do a SET at the end of their main pass logic, and then do a GET on that variable at the beginning of their shadowpass logic lol. But if they do that, then they are just stupid. Or smart, how should I know.
But either way, it shouldn't prevent shader forge from... creating the shader. It would simply have to include all their main pass logic necessary to compute that GET into the shadow pass, plus all their shadow pass logic. I assume shader forge already knows how to figure out what logic is required to compute ANY variable in the tree... so you should basically already have all the code necessary to create this new node?
Customer support service by UserEcho
Better yet, just allow me to optionally create a second Main Node within the same shader graph area, with all the same inputs as the main, Main Node. Only this... main node... will be called the Shadow Pass Main Node, or whatever. The rest is pretty self explanatory.
Or is it self explanatory? If it isn't self explanatory I'd be fine to explain it all right here. Lets see, two Main Nodes, but one of them is called Shadow Pass Main Node. The shadow pass main node has all the same inputs (21 of them? Can't remember). Can hook up all the stuff you want to happen in the shadow pass, which might be substantially less than what you need for the main pass. This is all for optimization of course.
HMMM and ooh, this would be tasty... if you select the shadow pass main node, then the menu on the left would say "shadow pass", and all the options there would be changed to show what you can do in the shadow pass.
HMMMM and ooooh, why not just let me add as many main nodes as I wanna, so I can make as many passes as I wanna. Mmmm.