Hi! I am working on a game with cross pipeline (URP and HDRP). Tried new feature from shadergraph that can generate shader for URP and HDRP. Both version is 10.2.2.
When I choose 2 targets for shadergraph it is showing that srp batcher is not compatible.
It is super easy to test this behaviour:
Create new project with Unity 2020.2.1f1 and URP 10.2.2.
I have also encountered the issue, but the error message for me is different:
I suppose the HDRP and URP passes have a different UnityPerMaterial definition and it disables SRP batcher, even though those passes will never be used together in the same frame.
What is strange for me that no one answering about this question and still I see that feature is marked as released from version 9 to version 11 (the newest one with Unity 2021). So it makes me think that maybe I do something wrong? Like when you forget to enable toggle from camera for specific effect because it was disabled by default for some reason.
Was a bug report ever raised for this? We appreciate bug posts here but in my opinion, bug reports via the process outlined at Unity QA: Building quality with passion will get more immediate action.
So I just tested what QA wrote in description and it seems working if you first install HDRP and then URP. If you do it backwards it is showing this error.
The question is how it is this possible? Can I fix my project somehow while we are waiting for bug resolving?
@alexvector Did you experience the same? I mean you installed hdrp onto urp or your case is different?
So this case cannot be fast fixed as I see. I tested what was in the description on issue tracker but it worked only because you also need to set a URP asset not only for the Graphics tab but also for the Quality settings. When I did it immediately show the same error message. It is actually great to see that the order does not matter but it is sad that we do not have any fast fixes then.
We also need this fixed.
I found a work-around, just delete the HDRP target in the graphs before building a URP build, but this is super un-convenient for a build pipeline workflow and in general.
Is there maybe a way to open a shadergraph in the editor and to remove targets via script? This would be easy to add to the build-pipeline procedure.