Big collection of free Shader Graph nodes

Hey Unity people.

I've been working on some shader graph node libraries in the past week or so. I'd be very happy to get some feedback on these and would love to hear if you've used any of them for any of your projects.

https://github.com/gilescoope/shader-graph-nodes

Complex

Do complex arithmetic in shader graph.

Composite

Complete set of Porter Duff transparency operations.

Halftone

Halftone rendering, monochrome or color.

Lab Color

Manipulate colors in the perception-based color spaces.

Pattern

Procedural geometric patterns.

Pixel Perfect

Pixel-wide primitives, no matter what the surface.

Quaternion

Quaternion algebra for rotation calculations in the graph.

SDF

Signed distance functions for amazing procedural effects.

Truchet

Truchet tiling nodes to make beautiful irregular patterns.

29 Likes

Thanks so much for these! Been playing around with them for a couple of days now, and particularly the SDF and truchet nodes offer a ton of possibilities.

So far this pretty garden-variety alpha-blended SDF-based cartoon water is the best example I’ve got, but will post more graphs when I come up with something more exciting

Edit: Wow, embedding images by link or upload is tremendously broken

2 Likes

That looks great, looking forward to seeing more stuff, let me know if there was something that wasn’t clear or any functionality you felt should have been there but wasn’t.

Any chance for a Blur or Distort node?

1 Like

Shader calculations are done per pixel without accessing other pixel information (aside from DDX, DDY, fwidth) so a blur node doesn’t make too much sense.

Distortions are possible, what distortions would be interesting?

The best example I can give is the noise texture node from Blender but for Unity I’m not sure how the distortion would work for different types of input as a separate node. Here it’s embedded in the Noise node

No distortion

With Distortion

Thanks for this!

1 Like

How would I go about installing these?

Hey there, from the GitHub page here

https://github.com/gilescoope/shader-graph-nodes

you can just click “Clone or Download” then “Download .zip”
If you extract your zip somewhere into your Project > Assets folder you should be able to use all the nodes from Shader Graph as you would use any other nodes.

Thanks for getting back to me! That doesn’t work, however (it was the first thing I did). Nodes simply don’t appear in the graph editor.
Could this be a version thing? I’m running 2018.2.14f1

I’m not sure, do you get compilation errors? Do you have the correct packages installed?

I just tried with 2018.3.0f2.

  • start a new project with the Lightweight RP (Preview) template
  • copy the “Nodes” folder from the repository into the project assets folder
  • create a shader graph

Now when I right click and select “Create Node” I can see all the nodes.

4070911--354685--Untitled-1.png

I think there was something vestigal in my current project that was stopping the nodes from compiling properly or just working at all. All newly created projects (LWRP and HDRP) seem to pick them up just fine. Thanks for your help, I really appreciate it :)

1 Like

That’s good to hear. I hope you can get the nodes in your project. If you get to the bottom of why it wasn’t working I’d be interested to hear.

Unity broke nodes by making function node class internal, my project depends on those, what should i do?

Ouch, thanks for letting me know about this. I’ll take a look as soon as I have some time. Which version of Unity is this?

19a14
sg 5.2.3

Thanks, I managed to reproduce this. I guess it’s someone in the Unity team setting the class to internal without thinking. It wouldn’t be the first time I’ve seen this.

I saw that you posted this already in the megathread so will wait to see what the response is there. I believe there’s very little I can do. In the meantime I’d suggest working in the last version of shadergraph that doesn’t have this restriction.

1 Like

From what I’ve heard, they did this intentionally. It is because they are working on redoing the API, so any custom nodes will need to be updated to work with the new API. I guess they made it private so less people will try to use it in the interim, and thus less people will need to redo their custom nodes…? My understanding is the new API is supposed to be available by the time 2019.1 is released.

1 Like

If you want custom nodes basically need to stick sg 4.6 (and therefore unity 18.3) until they release their new api.

there is now a new way to make custom nodes in unity 2019. there is a “custom node” node in which you can copy paste the hlsl code. its pretty easy to use. you will also have to update the lwrp or hdrp to a newer version when creating a new project.

1 Like