static void AddReplacementShaderCommandBufferOnCamera(Camera camera,
                                                              Shader shader,
                                                              ReplacementModes mode,
                                                              Color clear_color)
        {
            var cb = new CommandBuffer {
                name = mode.ToString()
            };

            cb.SetGlobalInt(_Shader_OutputMode_Name, (int)mode);
            camera.AddCommandBuffer(CameraEvent.BeforeForwardOpaque, cb);
            camera.AddCommandBuffer(CameraEvent.BeforeFinalPass, cb);
            camera.SetReplacementShader(shader, "");
            camera.backgroundColor = clear_color;
            camera.clearFlags      = CameraClearFlags.SolidColor;
        }
 static void AddReplacementShaderCommandBufferOnCamera(Camera cam, Shader shader, ReplacementModes mode)
 {
     AddReplacementShaderCommandBufferOnCamera(cam,
                                               shader,
                                               mode,
                                               Color.black);
 }