Me and my team is working on our project and constantly getting Error when customizing the shader graph:
A Hybrid Renderer V2 batch is using the shader “Shader Graphs/TestLight”, but the shader is either not compatible with Hybrid Renderer V2, is missing the DOTS_INSTANCING_ON variant, or there is a problem with the DOTS_INSTANCING_ON variant.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Thanks a lot for your reply. We’ve checked the View Generated Code for the Shader Graph and here’s the screenshot.
The other thing is that we were browsing through the forum and were trying to get the answer for the issue, and we found a reply from you, even though it was from last year we still gave it a try.
You’ve mentioned in that reply that the breakage of the shader graph might caused by incorrect ordering of subshaders. So me and my co-devs tried to modify our shader target 2.0 to 4.5 ones. however that didn’t work out, can you give us some advice on how to generate code for target 4.5 shader please?
The screenshot you posted seems to correctly define a target 4.5 shader (see “#pragma target 4.5”), and it has the correct DOTS_INSTANCING_ON multi_compile as well. There shouldn’t be anything else required, other than to define at least one DOTS instanced property, but shader graphs should always reference the transform matrix so that should be taken care of.
The next thing I would try is to look at the UNITY_DOTS_INSTANCING macros for definining the shader properties (in this case, Color), just to rule out something weird there.
Does the shader completely fail to render, or are you just getting a single error message with otherwise correct operation? We have seen the latter (single spurious error) happen when Unity is still compiling the shader and incorrectly issues the error for the placeholder “Loading” shader, and the actual shader is fine once it has compiled.
If the shader is failing to render, would it be possible for you to submit a bug report with a small repro project?