I’m trying to add a shader which uses GrabPass to a shader variant collection, but I get an error when attempting to add a variant. Im just using the example shader from https://docs.unity3d.com/Manual/SL-GrabPass.html. Anyone got any ideas on how to fix this, or is it an actual bug?
ArgumentException: shader GrabPassInvert pass type 0 does not have a shader snippet
UnityEngine.ShaderVariantCollection+ShaderVariant…ctor (UnityEngine.Shader shader, PassType passType, System.String[ ] keywords) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/ShaderBindings.gen.cs:525)
UnityEditor.AddShaderVariantWindow.Draw (Rect windowRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/ShaderVariantCollectionInspector.cs:397)
UnityEditor.AddShaderVariantWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/ShaderVariantCollectionInspector.cs:261)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[ ] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:187)
UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:180)
UnityEditor.HostView.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:76)