HDRP Surface Shaders?

Hi there,

I’m finally looking to upgrade some projects from Unity 2017. They make heavy use of procedural content on the GPU.

Currently they mostly use the old school way of RenderTextures as buffers to encode data, then reads those buffers in the Surface Shader - nice and easy to manipulate verts or fragments as needed. Some ComputeShaders/Buffers here and there.

From what I see in Unity 2021 and the HDRP world, that’s not possible anymore? It’s all Shader Graph?
I see some discussion around this from Unity and that something might come along in a few years.

I can’t be the only one who’s faced this, and would be curious to hear what paths anyone else has taken?

I’ve had a cursory look at Better Shaders, but it doesn’t seem to support Unity 2021 (officially at least?).

BTW these aren’t games, they’re installations that will only ever run on whatever hardware we spec (basically Windows + RTX cards).

Many thanks

The most common solution currently is:

Don’t switch to HDRP and stick with the built in renderer.

Better Shaders only supports LTS versions of Unity as otherwise it gets really insane to try and support the asset. There can be significant and breaking changes between sub versions of the same Unity or SRP.

Shader Graph is basically acting as a more limited surface shader anyways.
You can make a Custom Function Node to put your HLSL into which when indexes into your buffers or RenderTexture.
You can manipulate verts and fragment data in shadergraph.

Thanks both.

It doesn’t look like multiple passes are possible in Shader Graph either, which is kind of a deal breaker :s

I guess sticking to the built-in renderer may be the path of least pain for now.

I’ll investigate the Custom Function Node a little more though, hadn’t seen that thanks.