private ShadowFactory() { cmd = new CommandBuffer { name = "Shadow Commands" }; materialProps = new MaterialPropertyBlock(); materialProps.SetVector(ShaderId.CLIP_RECT, new Vector4(float.NegativeInfinity, float.NegativeInfinity, float.PositiveInfinity, float.PositiveInfinity)); materialProps.SetInt(ShaderId.COLOR_MASK, (int)ColorWriteMask.All); // Render shadow even if mask hide graphic ShaderProperties.Init(8); blurConfig = ScriptableObject.CreateInstance <ScalableBlurConfig>(); blurConfig.hideFlags = HideFlags.HideAndDontSave; blurProcessor = new ScalableBlur(); blurProcessor.Configure(blurConfig); }