Page Header

Shader Graph

Writing shader code can be a chore when all you want to do is make a nice effect. A shader graph allows you to visually construct a shader by connecting nodes together and seeing the result.

All the code is public so anyone can see how it works and suggest improvements and bug fixes. It is also much better for us to have a tool completely in C# to be able to iterate on it quickly, compared to native tools.
Shader Graph has nodes you can create, math functions, constant values, texture samplers. These nodes can be wired together and plugged into the inputs of the result node to change things like albedo, normals, roughness.

The preview will update showing you how the shader currently looks. When you save, a shader file will be generated ready for you to use in your materials.

New nodes are simple to create, this will be good if we ever decide to let users code their own graph nodes.
Right now the shader graph is very much a proof of concept but I think it's at a good enough stage to let people play around with it. We wanted to ship it as early as possible so it didn't stay on a branch for 6 months.

We're planning on beefing up the UI, mainly having property editors within the node UI itself. We will also be adding many more nodes and different kinds of shading models like Unlit and Post Processing.

Further down the line we want to think about if and how we can allow more complex shaders to be made in the graph, like geometry and compute shaders. At the very least we should allow the graph to change the vertex shader.

Modibility is also something to think about, should we let users code their own nodes? Will that cause problems with people sharing graphs?

Try it out and let us know what you think.

Comments