Your comments

BTW, I've hit this several times today not using the append node. Basically, if the input becomes invalid for any reason, you're settings on the component mask node get lost. 
It would be better to see both, but we likely only want to show one. Here's the thing; if it changes my settings at all, then it's broken, IMO. If I spent the time to specify BRG masking, and disconnect an input and reconnect it upstream, I don't want it to ever have changed it to something other than BRG. That's a destructive edit that I didn't actually make. I set that node to BRG, I should be able to trust that.

So if you think it should show RRR, I think that's fine - but if I later connect a vector3 to it, I'd want it to remember than I had set it to BRG, since that's what I specified. That way when I'm monkeying around with stuff on the otherside of the graph from it, it's not editing the top part of my graph destructively for me, causing me to spend 10 minutes tracking down what has broken.

And I'm guessing that (right now) if I click undo after the append changes my mask to RRR, it stays RRR, which means undo is broken as well in this case. (That's assuming you register undo's on a per node basis).



I think there's a few issues here. 

The append node should likely not say what it's output is until both inputs are connected. An append node shouldn't be able to output a float, after all..

The channel mask node should never change my settings. If I say I want BRG, then it should always say BRG. If I plug a float into it, it should upcast it to a float3 and give me my float 3 times. That way, no matter what happens upstream from it my settings will be retained.

The issue I was having is that my channel masks were getting changed some 30 nodes upstream from the section of the code I was working on, which made it hard to track down what had broken. 

BTW - I haven't come up with a repro for this, but I've seen the append node get stuck with the wrong number of outputs even when both inputs are connected, causing a compile error. (ie: 2 inputs, but shows float as output). If I see it again I'll try to come up with a repro..
I posted code node examples for this on the wiki if people need it now..
Must be some kind of validation update causing it, but when there's thirty nodes between the two, well, it's not so obvious to the user..
I've narrowed down the issue..

- Create an append node and plug two floats together to create a vector 2
- plug the result into the component mask node and separate out the R/G channels of your vector2
- Disconnect an input from the append node, everything is fine..
- Disconnect the second input from the append node, and the component mask changes it's settings to R/R


This is actually one of my biggest bottlenecks right now. It can take up to 20 seconds just to connect a node to another node with previews on. Not to mention, due to the CPU side rendering of node previews, they are often wrong or don't work at all. 

I've resorted to working with no previews, and no automatic update to make it bearable, which basically strips tons of important feedback from the UI. 
Just a note if you go to implement this (I wrote this node a while back for another shader graph). 

A lot of the math and libraries for this stuff on the web are, well, just plain wrong if you compare the results to the results you get in photoshop. I managed to fix a fair number of them, but this node will take quite a bit of your time if you want it to match photoshop's output.

The inability to write real nodes for the system is really an issue for me. Being able to build nodes out of other nodes is a great feature (and a boon for the less coder savvy part of the community), but woefully inefficient for certain types of shaders. It's also a complex feature to implement correctly if you want those nodes to be able to have nice interfaces.

Being able to type in some HLSL code on a node is also pretty nice, but again extremely limited unless that system lets me provide the full schema for a node and save them for later use. I don't really want to have to pull up a block of code and cut/paste it into every shader that uses that code. If I could drag them into the menu to install them there, then that would at least allow me to build up a library of nodes that I can reuse.

That said, neither of these allow me to easily create game specific nodes which make it easy for an artist to grab a global/constant variable provided by the game and use it in the shader graph. For instance, lets say you're making a music game and want to use the music intensity as an input to many shaders. Under the current system, all of these need to expose a float property and have code written to update that float value for that shader. However, if I can create a 'music intensity' node for them instead, significant amounts of 'hookup' time is saved, and potentially CPU time (I was on a project where doing something like this saved several milliseconds because there were thousands of instances doing this redundant copying).