How do I add ShaderGraph to Custom SRP

I haven’t been able to find any resources on how to implement ShaderGraph in a custom SRP. Before I delve into the depths of the URP and HDRP source code to try and make sense of their implementations, has anyone else figured this out?

(I’ve already looked through HDRP source a lot for other reasons such as lighting, volumetrics and Post FX, but it was not a pleasant experience…)

I’m using a custom SRP written from scratch, not based on URP or HDRP.

If anyone has figured this out or has any advice, that would be great!

I may also look at integrating the VFX graph, though ShaderGraph is the priority, as the designers on my team were previously using Amplify. (Which is of course incompatible with my custom SRP)

1 Like

Did you get anywhere with this just considering creating an SRP

Nope, sorry.

1 Like

Has anyone ever figured this out?

Apparently not, I still haven’t gotten around to figuring it out, I’m just using amplify instead since it’s very easy to make templates that work with any kind of shader.

Shadergraph has so many missing features and editor performance issues that I don’t think I’ll bother with it in the future. If you don’t overcomplicate your rendering pipeline, hand-writing shaders is pretty easy so there’s not really much point in a shader graph system in the first place.

That was pretty much my takeaway when I made a custom SRP a few years ago. Like you said, if you know the ins and outs of your own SRP then it becomes much more viable to just write straight shaders. And honestly, even without being particularly skilled at math or shaders in general, I can write shader code about a hundred times faster than I can faff about with a visual editor.

The only reason I ever started using ShaderGraph was because was because it was slightly less of a nightmare than trying to figure out all of the randomly subtle (and not-so-subtle) changes to the standard shader libraries, variable names, function names, etc.. for URP after years of working with the Built-in on.

1 Like