I’ve started working a bit with the new Shader Graph in Unity (mostly because I’ve started using URP) so I just want to share some early observations. TL;DR I’m a bit leery of Shader Graph right now and am finding I’d rather just write the shaders manually as I have been.
Shader Graph seems really useful (after all, shaders are a visual thing, so it makes sense to develop them visually) but I’ve hit against a couple issues already. The first is that the stencil buffer isn’t supported. Now there are ways to work with the stencil buffer even using shader graphs, using something called renderer features in the scriptable render pipeline. That is pretty finicky and somewhat limited though, especially compared to simply declaring a stencil block at the top of your hand-written shader.
Then I hit version incompatibilities with graphs authored in different versions of Shader Graph. I didn’t dig into what exactly the incompatibilities were (one obviously expects to have some differences between versions) but simply decided to heck with all this, it’s more efficient for me to simply
On top of all that, they seem to be a little wonky for performance. Not during the running game mind you, but rather in the editor while I work on things. Obviously the performance during the game is most important, but it’s rather annoying that material previews appear pink because the graph isn’t compiling fast enough, that kind of thing.
My ultimate conclusion is that I want to explore Shader Graph again when it’s more fully baked (again, this approach to authoring shaders does seem powerful) but for now I think I’ll keep hand-writing my shaders.