This is based off of using the LWRP version 5.10
Show Generated Shader Code
Older versions of Shader Graph had the option for looking at the generated shader code. This is incredibly useful for setting up basic shaders and then allowing advanced users to extend the capabilities of the shader outside of the confines of Shader Graph’s abilities. Adding a lot more functionality would help this, but for my usual custom shader use cases and the existing limitations of Shader Graph I don’t see myself ever using it for production work. I fully admit I’m an advanced shader user though.
edit: it’s still there! this wasn’t showing for me due to some UI bug causing right click to do nothing (among other things).
Instanced property support
Currently the master nodes themselves appear to be setup for instancing, but there’s no way to set material properties themselves to be instanced or not.
Make Branch node actually an be an if
Fairly simple. Right now the Branch node is a bit of a lie. Since it uses a lerp, it offers none of the advantages an actual if could offer, and is more expensive than just using a straight Lerp node that takes a float in nearly 100% of use cases as it avoids unnecessary float to bool back to float conversions that most users would likely end up doing. A real “if” fed by a material property boolean is nearly as efficient as a shader variant on modern hardware, and will end up being translated into a lerp or fast comparison for older APIs anyway. No need to do anything fancy with the shader generator as a reasonably smart shader compiler will automatically gather up most of the shader code that’s only used by a particular branch.
Comments
The node groups are nice, but they only offer a single layer of comments, and because the text is so large using them for proper comments isn’t viable. A comment node would just be a resizable box that shows text inside it. Having it attach to nodes like the group node does is a “nice to have”, but in my mind far less important.
edit: It’s coming!
Direct control over render state
ZWrite, ZTest, Cull, Blend, BlendOp, ColorMask, Stencil, etc. It’s nice to have these hidden and auto set by the “Surface”, “Blend” and “Two Sided” settings for basic shaders and new users, but for many effects you need far more control.
Feedback for when nodes won’t connect
Simple cases like trying to connect a float to predicate should call this conflict out with a tooltip of some kind on hover rather than just disabling the dot. More advanced cases like using a Sample Texture node to modify the position just leave users confused at the moment. Should tell the user why the nodes won’t connect, and offer a solution, like “use a Sample Texture LOD node instead”. A link to documentation with a more thorough explanation would be good too.
Static Switches
This is a feature of Unreal materials, roughly akin to #pragma shader_feature
. Would love to see both [Toggle] and [KeywordEnum] functionality, but toggle alone would be worth a ton. Would make shader graphs infinitely more useful. No need to do anything fancy with the shader generation either, just wrap a single pass-through variable in a #if defined()
and let the shader compiler will strip unused code.
Multi-Pass Support
You can already add multiple master nodes to a shader graph, though any node past the “oldest” doesn’t actually do anything. I understand part of this is on SRPs not supporting multiple passes beyond one lit and one unlit pass, but even that combination doesn’t work with Shader Graph. Why allow multiple master nodes at all if they don’t do anything? At the very least show which master node is actually “active”, and maybe add the option to switch which is the “master” master node. If multi-pass support is at some point expected, there needs to be an order property.
Shader Folder Path
This is more a UI issue than a missing feature. You can change the folder hierarchy for Shader Graphs, but it isn’t obvious that the “Shader Graph” text on the blackboard is editable. For one, the text is greyed out, which for all other cases throughout the Unity UI means “not editable”, and you cannot modify the more obvious shader name itself just above as that is pulled from the file name directly. It really needs some kind of feedback that it’s editable, and that it’s the path. Something like have it highlight on mouse over, have a / at the end of the path, or literal "Path: " text before it. Something more than faded out text.
Pass Through Node
A node that does explicitly nothing, and exists purely for line organization purposes. Some other node based tools allow you to add handles mid-line rather than going through a node, which is a much more visually and functionally clean solution for the end user. Relative low priority, but definitely a nice to have. Would likely be useful for the other node based tools Unity has (ie VFX Graph).
Create Node > All
I find it very hard to find the node I want in the current hierarchy. I kind of want an “All” option that just shows a single monolithic list of every node sorted by name, maybe showing the folder hierarchy. Sometimes I can find the node I want by typing in my guess for what you might call it, but a few nodes aren’t named anything remotely similar to the HLSL code equivalents. This is actually a complaint I have about the documentation as well that I prefered on the previous wiki site as it used to have a “show all” option. I used that exclusively for finding nodes as it was way faster than going through the hierarchy for me. There’s also a lot of useful nodes that are simply buried so far deep that I’d never know they existed if I hadn’t looked at the full list.
Sampler Count and Approximate Instruction Count Stats
Super useful to know how many samplers are in use, and while instruction counts aren’t a 100% accurate way of knowing how performant a shader is, it’s better than node count (since some nodes actually add a lot of instructions) or nothing at all.
Let us use the Node API
For a while there was the Custom Node API. This was clearly not good enough as many basic features simply didn’t work. The latest versions of Shader Graph appear to have completely deleted that API, which is good, but has also made the Node API used for the built in nodes be internal. Why not let us write nodes using the same API the internal nodes are written in instead of exposing a custom one? For people writing their own SRPs, I suspect many of us will just end up modifying that code directly to do that anyway, but until then this is quite an antagonistic approach for the asset store.
Loops
This one will likely require some thought and modifications to the shader generation. Maybe something like in-graph sub-graphs or a group with inputs / outputs for setup. It’s a feature I rarely see in node based tools, but they have been done. Many shaders end up being absolutely gigantic simply because every iteration of a loop has to be manually flattened out. This can make simple blur shaders that would be 10 lines in a vertex fragment shader be mess of a few hundred nodes.