Hybrid rendering V2 SRP batcher error

Been trying to figure this out but no matter what material I try to use on a custom built mesh at runtime I get this error.

A Hybrid Renderer V2 batch is using a pass from the shader “HDRP/Lit”, which is not SRP batcher compatible. Only SRP batcher compatible passes are supported with the Hybrid Renderer.

I tried turning off static batching for HDRP but that didn’t work and any material seems to give this error. Any ideas what is causing this?

Bump

You can try selecting the HDRP/Lit shader and looking at the Inspector. It should contain an SRP Batcher compatibility status code and any related error messages.

Ok found that and says it is not. The shaders from the Hybrid sample project say they are though and I have the newest Hybrid render package and the latest HDRP. Is there another package I’m missing to get the SRP Batcher compatible shaders?

What might have happened is that there is some particular variant of the shader which is incompatible. If this is the case, then likely the sample project is not using that variant, and since the Unity Editor compiles the shader variants on demand, the variant is never loaded and doesn’t cause compatibility issues. This has happened previously with some HDRP debug view shader variants.

The Inspector view should hopefully give you the name of the property or constant buffer which is the source of the incompatibility, which should be helpful in tracking down what the problem is. Once that is known, it is likely you could modify the source locally to work around the issue.

OK thank you, so I should be able to delete the variant then and it will recompile to be compatible I take it.